Initial import
[samba] / debian / patches / ubuntu-auxsrc.patch
diff --git a/debian/patches/ubuntu-auxsrc.patch b/debian/patches/ubuntu-auxsrc.patch
new file mode 100644 (file)
index 0000000..87d2352
--- /dev/null
@@ -0,0 +1,165 @@
+--- samba-3.0.7.orig/source/utils/ntlm_auth_proto.h
++++ samba-3.0.7/source/utils/ntlm_auth_proto.h
+@@ -0,0 +1,28 @@
++#ifndef _NTLM_AUTH_PROTO_H_
++#define _NTLM_AUTH_PROTO_H_
++
++/* This file is automatically generated with "make proto". DO NOT EDIT */
++
++
++/* The following definitions come from utils/ntlm_auth.c  */
++
++const char *get_winbind_domain(void);
++const char *get_winbind_netbios_name(void);
++DATA_BLOB get_challenge(void) ;
++NTSTATUS contact_winbind_auth_crap(const char *username, 
++                                 const char *domain, 
++                                 const char *workstation,
++                                 const DATA_BLOB *challenge, 
++                                 const DATA_BLOB *lm_response, 
++                                 const DATA_BLOB *nt_response, 
++                                 uint32 flags, 
++                                 uint8 lm_key[8], 
++                                 uint8 user_session_key[16], 
++                                 char **error_string, 
++                                 char **unix_name) ;
++
++/* The following definitions come from utils/ntlm_auth_diagnostics.c  */
++
++BOOL diagnose_ntlm_auth(void);
++
++#endif /*  _NTLM_AUTH_PROTO_H_  */
+--- samba-3.0.7.orig/source/smbadduser
++++ samba-3.0.7/source/smbadduser
+@@ -0,0 +1,79 @@
++#!/bin/csh
++#
++# smbadduser - Written by Mike Zakharoff
++#
++
++prefix=/usr
++exec_prefix=${prefix}
++LIBDIR=${prefix}/lib/samba
++PRIVATEDIR=/etc/samba
++CONFIGDIR=/etc/samba
++
++unalias *
++set path = ($path /usr/local/samba/bin)
++
++set smbpasswd = $PRIVATEDIR/smbpasswd
++set user_map  = $CONFIGDIR/users.map
++
++#
++# Set to site specific passwd command
++#
++set passwd    = "cat /etc/passwd"
++#set passwd    = "niscat passwd.org_dir"
++#set passwd    = "ypcat passwd"
++
++set line = "----------------------------------------------------------"
++if ($#argv == 0) then
++      echo $line
++      echo "Written: Mike Zakharoff email: michael.j.zakharoff@boeing.com"
++      echo ""
++      echo "   1) Updates $smbpasswd"
++      echo "   2) Updates $user_map"
++      echo "   3) Executes smbpasswd for each new user"
++      echo ""
++      echo "smbadduser unixid:ntid unixid:ntid ..."
++      echo ""
++      echo "Example: smbadduser zak:zakharoffm johns:smithj"
++      echo $line
++      exit 1
++endif
++
++touch $smbpasswd $user_map
++set new  = ()
++foreach one ($argv)
++      echo $one | grep ':' >& /dev/null
++      if ($status != 0) then
++              echo "ERROR: Must use unixid:ntid like -> zak:zakharoffm"
++              continue
++      endif
++      set unix = `echo $one | awk -F: '{print $1}'`
++      set ntid = `echo $one | awk -F: '{print $2}'`
++
++      set usr = `eval $passwd | awk -F: '$1==USR {print $1}' USR=$unix`
++      if ($#usr != 1) then
++              echo "ERROR: $unix Not in passwd database SKIPPING..."
++              continue
++      endif
++        set tmp = `cat $smbpasswd | awk -F: '$1==USR {print $1}' USR=$unix`
++      if ($#tmp != 0) then
++              echo "ERROR: $unix is already in $smbpasswd SKIPPING..."
++              continue
++      endif
++
++      echo "Adding: $unix to $smbpasswd"
++      /usr/bin/smbpasswd -a -n $unix
++      if ($unix != $ntid) then
++              echo "Adding: {$unix = $ntid} to $user_map"
++              echo "$unix = $ntid" >> $user_map
++      endif
++      set new = ($new $unix)
++end
++
++#
++# Enter password for new users
++#
++foreach one ($new)
++      echo $line
++      echo "ENTER password for $one"
++      smbpasswd $one
++end
+--- samba-3.0.7.orig/source/script/gen-8bit-gap.sh
++++ samba-3.0.7/source/script/gen-8bit-gap.sh
+@@ -0,0 +1,49 @@
++#!/bin/sh
++if test $# -ne 2 ; then
++      echo "Usage: $0 <charmap file> <CHARSET NAME>"
++      exit 1
++fi
++
++CHARMAP=$1
++CHARSETNAME=$2
++
++echo "/* "
++echo " * Conversion table for $CHARSETNAME charset "
++echo " * "
++echo " * Conversion tables are generated using $CHARMAP table "
++echo " * and source/script/gen-8bit-gap.sh script "
++echo " * "
++echo " * This program is free software; you can redistribute it and/or modify "
++echo " * it under the terms of the GNU General Public License as published by "
++echo " * the Free Software Foundation; either version 2 of the License, or "
++echo " * (at your option) any later version. "
++echo " *  "
++echo " * This program is distributed in the hope that it will be useful,"
++echo " * but WITHOUT ANY WARRANTY; without even the implied warranty of "
++echo " * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the "
++echo " * GNU General Public License for more details. "
++echo " *  "
++echo " * You should have received a copy of the GNU General Public License "
++echo " * along with this program; if not, write to the Free Software "
++echo " * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. "
++echo " */"
++
++echo '#include "includes.h"'
++echo
++echo "static const uint16 to_ucs2[256] = {"
++cat "$CHARMAP" | gawk -f ./script/gen-8bit-gap.awk
++echo "};"
++echo
++echo "static const struct charset_gap_table from_idx[] = {"
++sed -ne 's/^<U\(....\).*/\1/p' \
++    "$CHARMAP" | sort -u | gawk -f ./script/gap.awk
++echo "  { 0xffff, 0xffff, 0 }"
++echo "};"
++echo
++echo "static const unsigned char from_ucs2[] = {"
++sed -ne 's/^<U\(....\)>[[:space:]]*.x\(..\).*/\1 \2/p' \
++    "$CHARMAP" | sort -u | gawk -f ./script/gaptab.awk
++echo "};"
++echo 
++echo "SMB_GENERATE_CHARSET_MODULE_8_BIT_GAP($CHARSETNAME)"
++echo