From 0e8fd3398771da2f016d72830179507f3edda51b Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Sat, 4 May 1996 07:50:46 +0000 Subject: Initial version imported to CVS (This used to be commit 291551d80711daab7b7581720bcd9a08d6096517) --- source3/script/addtosmbpass | 74 ++++++++++++++++++++ source3/script/installbin.sh | 42 ++++++++++++ source3/script/installman.sh | 35 ++++++++++ source3/script/mksmbpasswd.sh | 6 ++ source3/script/revert.sh | 15 ++++ source3/script/smbtar | 141 ++++++++++++++++++++++++++++++++++++++ source3/script/updatesmbpasswd.sh | 14 ++++ 7 files changed, 327 insertions(+) create mode 100644 source3/script/addtosmbpass create mode 100755 source3/script/installbin.sh create mode 100755 source3/script/installman.sh create mode 100755 source3/script/mksmbpasswd.sh create mode 100755 source3/script/revert.sh create mode 100644 source3/script/smbtar create mode 100755 source3/script/updatesmbpasswd.sh (limited to 'source3/script') diff --git a/source3/script/addtosmbpass b/source3/script/addtosmbpass new file mode 100644 index 0000000000..42af518397 --- /dev/null +++ b/source3/script/addtosmbpass @@ -0,0 +1,74 @@ +#!/usr/bin/awk -f +# edit the line above to point to your real location of awk interpreter + +# awk program for adding new entries in smbpasswd files +# arguments are account names to add; feed it an existent Samba password +# file on stdin, results will be written on stdout +# +# Michal Jaegermann, michal@ellpspace.math.ualberta.ca, 1995-11-09 + +BEGIN { + me = "addtosmbpass"; + count = ARGC; + FS = ":"; + + if (count == 1) { + print "Usage:", me, + "name1 [name2 ....] < smbpasswd.in > smbpasswd.out"; + ARGV[1] = "/dev/null"; + ARGC = 2; + exit; + } + + for(i = 1; i < count; i++) { + names[ARGV[i]] = " "; + delete ARGV[i]; + } +# sane awk should work simply with 'ARGC = 1', but not every awk +# implementation is sane - big sigh!! + ARGV[1] = "-"; + ARGC = 2; +# +# If you have ypmatch but is not RPC registered (some Linux systems +# for example) comment out the next line. +# "which ypmatch" | getline ypmatch; + if (1 != match(ypmatch, /^\//)) { + ypmatch = ""; + } + pwdf = "/etc/passwd"; +} +#check for names already present in input +{ + print $0; + for(name in names) { + if($1 ~ name) { + delete names[name]; + } + } +} +END { + fmt = "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:"; + fmt = fmt "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n"; + for(name in names) { + while ((getline < pwdf) > 0) { + if ($1 == name) { + printf(fmt, $1, $3, $5, $6, $7); + close(pwdf); + notfound = ""; + break; + } + notfound = "n"; + } + $0 = ""; + if (notfound && ypmatch) { +# try to find in NIS databases + command = ypmatch " " name " passwd"; + command | getline; + if (NF > 0) { + printf(fmt, $1, $3, $5, $6, $7); + } + close(command); + } + } +} + diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh new file mode 100755 index 0000000000..633e6cb5bb --- /dev/null +++ b/source3/script/installbin.sh @@ -0,0 +1,42 @@ +#!/bin/sh +INSTALLPERMS=$1 +BASEDIR=$2 +BINDIR=$3 +LIBDIR=$4 +VARDIR=$5 +shift +shift +shift +shift +shift + +for d in $BASEDIR $BINDIR $LIBDIR $VARDIR; do +if [ ! -d $d ]; then +mkdir $d +if [ ! -d $d ]; then + echo Failed to make directory $d + exit 1 +fi +fi +done + + +for p in $*; do + echo Installing $p as $BINDIR/$p + if [ -f $BINDIR/$p ]; then + mv $BINDIR/$p $BINDIR/$p.old + fi + cp $p $BINDIR/$p + chmod $INSTALLPERMS $BINDIR/$p +done + + +cat << EOF +====================================================================== +The binaries are installed. You may restore the old binaries (if there +were any) using the command "make revert" +====================================================================== +EOF + +exit 0 + diff --git a/source3/script/installman.sh b/source3/script/installman.sh new file mode 100755 index 0000000000..a79d157c5f --- /dev/null +++ b/source3/script/installman.sh @@ -0,0 +1,35 @@ +#!/bin/sh +MANDIR=$1 +SRCDIR=$2 + +echo Installing man pages in $MANDIR + +for d in $MANDIR $MANDIR/man1 $MANDIR/man5 $MANDIR/man7 $MANDIR/man8; do +if [ ! -d $d ]; then +mkdir $d +if [ ! -d $d ]; then + echo Failed to make directory $d + exit 1 +fi +fi +done + +cp $SRCDIR../docs/*.1 $MANDIR/man1 +cp $SRCDIR../docs/*.5 $MANDIR/man5 +cp $SRCDIR../docs/*.8 $MANDIR/man8 +cp $SRCDIR../docs/*.7 $MANDIR/man7 +echo Setting permissions on man pages +chmod 0644 $MANDIR/man1/smbstatus.1 +chmod 0644 $MANDIR/man1/smbclient.1 +chmod 0644 $MANDIR/man1/smbrun.1 +chmod 0644 $MANDIR/man1/testparm.1 +chmod 0644 $MANDIR/man1/testprns.1 +chmod 0644 $MANDIR/man1/smbtar.1 +chmod 0644 $MANDIR/man5/smb.conf.5 +chmod 0644 $MANDIR/man7/samba.7 +chmod 0644 $MANDIR/man8/smbd.8 +chmod 0644 $MANDIR/man8/nmbd.8 + +echo Man pages installed +exit 0 + diff --git a/source3/script/mksmbpasswd.sh b/source3/script/mksmbpasswd.sh new file mode 100755 index 0000000000..6e592acd65 --- /dev/null +++ b/source3/script/mksmbpasswd.sh @@ -0,0 +1,6 @@ +#!/bin/sh +awk 'BEGIN {FS=":" + printf("#\n# SMB password file.\n#\n") + } +{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n", $1, $3, $5, $6, $7) } +' diff --git a/source3/script/revert.sh b/source3/script/revert.sh new file mode 100755 index 0000000000..68b47bf39d --- /dev/null +++ b/source3/script/revert.sh @@ -0,0 +1,15 @@ +#!/bin/sh +BINDIR=$1 +shift + +for p in $*; do + if [ -f $BINDIR/$p.old ]; then + echo Restoring $BINDIR/$p.old as $BINDIR/$p + mv $BINDIR/$p $BINDIR/$p.new + mv $BINDIR/$p.old $BINDIR/$p + rm -f $BINDIR/$p.new + fi +done + +exit 0 + diff --git a/source3/script/smbtar b/source3/script/smbtar new file mode 100644 index 0000000000..fc032ed41c --- /dev/null +++ b/source3/script/smbtar @@ -0,0 +1,141 @@ +#!/bin/sh +# +# smbtar script - front end to smbclient +# +# Authors: Martin.Kraemer +# and Ricky Poulten (ricky@logcam.co.uk) +# +# (May need to change shell to ksh for HPUX or OSF for better getopts) + +case $0 in + # when called by absolute path, assume smbclient is in the same directory + /*) + SMBCLIENT="`dirname $0`/smbclient";; + *) # edit this to show where your smbclient is + SMBCLIENT="./smbclient";; +esac + +# These are the default values. You could fill them in if you know what +# you're doing, but beware: better not store a plain text password! +server="" +service="backup" # Default: a service called "backup" +password="" +username=$LOGNAME # Default: same user name as in *nix +verbose="2>/dev/null" # Default: no echo to stdout +log="-d 2" +newer="" +blocksize="" +tarcmd="c" +tarargs="" +cdcmd="\\" +tapefile=${TAPE-tar.out} + +Usage(){ + ex=$1 + shift +echo >&2 "Usage: `basename $0` [] [] +Function: backup/restore a Windows PC directories to a local tape file +Options: (Description) (Default) + -r Restore from tape file to PC Save from PC to tapefile + -i Incremental mode Full backup mode + -v Verbose mode: echo command Don't echo anything + -s Specify PC Server $server + -p Specify PC Password $password + -x Specify PC Share $service + -X Exclude mode Include + -N File for date comparison `set -- $newer; echo $2` + -b Specify tape's blocksize `set -- $blocksize; echo $2` + -d Specify a directory in share $cdcmd + -l Specify a Samba Log Level `set -- $log; echo $2` + -u Specify User Name $username + -t Specify Tape device $tapefile +" + echo >&2 "$@" + exit $ex +} + +while getopts rivl:b:d:N:s:p:x:u:Xt: c; do + case $c in + r) # [r]estore to Windows (instead of the default "Save from Windows") + tarcmd="x" + ;; + i) # [i]ncremental + tarargs=${tarargs}g + ;; + l) # specify [l]og file + log="-d $OPTARG" + case "$OPTARG" in + [0-9]*) ;; + *) echo >&2 "$0: Error, log level not numeric: -l $OPTARG" + exit 1 + esac + ;; + d) # specify [d]irectory to change to in server's share + cdcmd="$OPTARG" + ;; + N) # compare with a file, test if [n]ewer + if [ -f $OPTARG ]; then + newer=$OPTARG + tarargs=${tarargs}N + else + echo >&2 $0: Warning, $OPTARG not found + fi + ;; + X) # Add exclude flag + tarargs=${tarargs}X + ;; + s) # specify [s]erver's share to connect to - this MUST be given. + server="$OPTARG" + ;; + b) # specify [b]locksize + blocksize="blocksize $OPTARG" + case "$OPTARG" in + [0-9]*) ;; + *) echo >&2 "$0: Error, block size not numeric: -b $OPTARG" + exit 1 + esac + tarargs=${tarargs}b + ;; + p) # specify [p]assword to use + password="$OPTARG" + ;; + x) # specify windows [s]hare to use + service="$OPTARG" + ;; + t) # specify [t]apefile on local host + tapefile="$OPTARG" + ;; + u) # specify [u]sername for connection + username="$OPTARG" + ;; + v) # be [v]erbose and display what's going on + verbose="" + ;; + '?') # any other switch + Usage 2 "Invalid switch specified - abort." + ;; + esac +done + +shift `expr $OPTIND - 1` + +if [ "$server" = "" ] || [ "$service" = "" ]; then + Usage 1 "No server or no service specified - abort." +fi + +# if the -v switch is set, the echo the current parameters +if [ -z "$verbose" ]; then + echo "server is $server" +# echo "share is $service" + echo "share is $service\\$cdcmd" + echo "tar args is $tarargs" +# echo "password is $password" # passwords should never be sent to screen + echo "tape is $tapefile" + echo "blocksize is $blocksize" +fi + +eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \ +-E -N $log -D "'$cdcmd'" \ +-T${tarcmd}${tarargs} $blocksize $newer $tapefile $* $verbose + + diff --git a/source3/script/updatesmbpasswd.sh b/source3/script/updatesmbpasswd.sh new file mode 100755 index 0000000000..1d7e0d7332 --- /dev/null +++ b/source3/script/updatesmbpasswd.sh @@ -0,0 +1,14 @@ +#!/bin/sh +nawk 'BEGIN {FS=":"} +{ + if( $0 ~ "^#" ) { + print $0 + } else if( (length($4) == 32) && (($4 ~ "^[0-9A-F]*$") || ($4 ~ "^[X]*$") || ( $4 ~ "^[*]*$"))) { + print $0 + } else { + printf( "%s:%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:", $1, $2, $3); + for(i = 4; i <= NF; i++) + printf("%s:", $i) + printf("\n") + } +}' -- cgit From 1b87ef2440898e73f438f8816c8c3da5af6e7d66 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 30 May 1996 03:16:17 +0000 Subject: - added an entry on WinDD to samba.faq - added a sample smb.conf from Thoralf.Freitag@remserv.rz.fhtw-berlin.de - print the errno when you get a can't change directory error - added installscripts.sh from James_K._Foote.PARC@xerox.com (This used to be commit 48c6b86d4c580d62ef46132dc04ce2b1d14e21e8) --- source3/script/installscripts.sh | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 source3/script/installscripts.sh (limited to 'source3/script') diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh new file mode 100755 index 0000000000..a3defa16e1 --- /dev/null +++ b/source3/script/installscripts.sh @@ -0,0 +1,26 @@ +#!/bin/sh +# this script courtesy of James_K._Foote.PARC@xerox.com +INSTALLPERMS=$1 +BINDIR=$2 +SRCDIR=$3 + +echo Installing scripts in $BINDIR + +for d in $BINDIR; do + if [ ! -d $d ]; then + mkdir $d + if [ ! -d $d ]; then + echo Failed to make directory $d + exit 1 + fi + fi +done + +cp $SRCDIR/smbtar $BINDIR +cp $SRCDIR/addtosmbpass $BINDIR +echo Setting permissions on scripts +chmod $INSTALLPERMS $BINDIR/smbtar +chmod $INSTALLPERMS $BINDIR/addtosmbpass + +echo Scripts installed +exit 0 -- cgit From a2c1623827406667a4f2f058c24f1d971f6627f8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 4 Jun 1996 06:42:03 +0000 Subject: a huge pile of changes :-) The biggest thing is the integration of Lukes new nmbd. Its still largely untested, so we will really need some feedback I've also added auto prototype generation and cleaned up a lot of minor things as a result (This used to be commit 0d8dcfa13c527ec2c8aca39ba49c09e4e694b26c) --- source3/script/mkproto.awk | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 source3/script/mkproto.awk (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk new file mode 100644 index 0000000000..4bf0d3c37d --- /dev/null +++ b/source3/script/mkproto.awk @@ -0,0 +1,39 @@ +# generate prototypes for Samba C code + + +BEGIN { + inheader=0; +} + +{ + if (inheader) { + if (match($0,"[)][ \t]*$")) { + inheader = 0; + printf "%s;\n",$0; + } else { + printf "%s\n",$0; + } + next; + } +} + +/^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ { + next; +} + +!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time/ { + next; +} + + +/[(].*[)][ \t]*$/ { + printf "%s;\n",$0; + next; +} + +/[(]/ { + inheader=1; + printf "%s\n",$0; + next; +} + -- cgit From 5607ff396c375976e440f9c955a313ddd58e3bbd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 4 Jun 1996 06:53:43 +0000 Subject: add dummy quotas fn fix typo in reply to backup lists (This used to be commit bc4a2994377ab078d3d1a900f79fda9dfe4d0e6a) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 4bf0d3c37d..d7b042652d 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -1,5 +1,5 @@ # generate prototypes for Samba C code - +# tridge, June 1996 BEGIN { inheader=0; -- cgit From 4eba893b02334953b0f1bc082dcba6f930f9ff80 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 8 Jun 1996 04:33:37 +0000 Subject: - added comments to byteorder.h explaining how it works. - fixed problem with installscripts if srcdir is not set - fixed ptr init bug in interface.c - changed default lookup type in nmblookup to match nbtstat under NT - new quotas fixes for sunos and solaris (This used to be commit e775576f026d282473256aeac6fef65a85acd98e) --- source3/script/installscripts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh index a3defa16e1..c27d41c36b 100755 --- a/source3/script/installscripts.sh +++ b/source3/script/installscripts.sh @@ -16,8 +16,8 @@ for d in $BINDIR; do fi done -cp $SRCDIR/smbtar $BINDIR -cp $SRCDIR/addtosmbpass $BINDIR +cp ${SRCDIR}smbtar $BINDIR +cp ${SRCDIR}addtosmbpass $BINDIR echo Setting permissions on scripts chmod $INSTALLPERMS $BINDIR/smbtar chmod $INSTALLPERMS $BINDIR/addtosmbpass -- cgit From 7e3b4a1c0df1434eb3d02f93c736ce065f9898d8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 10 Jun 1996 04:38:24 +0000 Subject: got rid of a lot of redundent header files as we now globally generate prototypes automatically using "make proto". This is much less prone to error than the old method of manually adding prototypes (This used to be commit b551dc98f7cc194a5fc2e67a4ebae7fd67a01bbc) --- source3/script/mkproto.awk | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index d7b042652d..3f3ef1c9fc 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -3,6 +3,8 @@ BEGIN { inheader=0; + print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */" + print "" } { @@ -17,6 +19,43 @@ BEGIN { } } +# we handle the loadparm.c fns separately + +/^FN_LOCAL_BOOL/ { + split($0,a,"[,()]") + printf "BOOL %s(int );\n", a[2] +} + +/^FN_LOCAL_STRING/ { + split($0,a,"[,()]") + printf "char *%s(int );\n", a[2] +} + +/^FN_LOCAL_INT/ { + split($0,a,"[,()]") + printf "int %s(int );\n", a[2] +} + +/^FN_LOCAL_CHAR/ { + split($0,a,"[,()]") + printf "char %s(int );\n", a[2] +} + +/^FN_GLOBAL_BOOL/ { + split($0,a,"[,()]") + printf "BOOL %s(void);\n", a[2] +} + +/^FN_GLOBAL_STRING/ { + split($0,a,"[,()]") + printf "char *%s(void);\n", a[2] +} + +/^FN_GLOBAL_INT/ { + split($0,a,"[,()]") + printf "int %s(void);\n", a[2] +} + /^static|^extern/ || !/^[a-zA-Z]/ || /[;]/ { next; } -- cgit From 912d4dae3af4ca952b06c491f5c711c0cdea568b Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Mon, 17 Jun 1996 14:11:14 +0000 Subject: Added source filename to give crude index Dan 17 June 1996 (This used to be commit 5a72a6c8dfe3a0898db514c35a9d704c3627c41d) --- source3/script/mkproto.awk | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 3f3ef1c9fc..78f3fa080b 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -1,13 +1,22 @@ # generate prototypes for Samba C code # tridge, June 1996 +# added comment for each source file for use as crude index +# dan, 17 June 1996 BEGIN { inheader=0; + current_file=""; print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */" print "" } { + if (FILENAME!=current_file) { + print "" + print "/*The following definitions come from ",FILENAME," */" + print "" + current_file=FILENAME + } if (inheader) { if (match($0,"[)][ \t]*$")) { inheader = 0; -- cgit From ddc4fc68b97f376b97c3a59febf241ace3fb8fc7 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Wed, 19 Jun 1996 12:27:26 +0000 Subject: - deleted reduntant blank line at end of file (JHT) (This used to be commit 7960522e18bb34cba4fbc6ef0d68485d484c9cad) --- source3/script/smbtar | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/smbtar b/source3/script/smbtar index fc032ed41c..156375ce9c 100644 --- a/source3/script/smbtar +++ b/source3/script/smbtar @@ -138,4 +138,3 @@ eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \ -E -N $log -D "'$cdcmd'" \ -T${tarcmd}${tarargs} $blocksize $newer $tapefile $* $verbose - -- cgit From ed2639ebe21dde49af816a96ec6ea1e40f76e768 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Sat, 29 Jun 1996 18:49:20 +0000 Subject: luke's first attempt at using cvs accidentally updated the Makefile updated the name database structure (again!). this time, there is one name database per local interface. there is also a pseudo-interface on ip 255.255.255.255. its purpose is to store WINS name entries. all the local interface name databases store SELF names only. the WINS name database stores non-special browser names. added wins.dat file: records WINS entries in ascii format. this is reloaded when nmbd restarts. added repeating code for response packets. timer is in seconds only at the moment. updated the response queue code to deal with samba registering with a WINS server a bit better (added more cases when a response isn't received). tidied up the response packet processing code and expire_response_queue() code. added cross references between response received and await-response expired code. added over-zealous code that checks all machines that register with samba as a WINS server (every 10 minutes i think): to see whether they are still alive or not (see rfc1001.txt) bug reported by terry@ren.pc.athabascau.ca: DNSFAILed names _stay_ as DNSFAIL, even though the machine may come back up and REGISTER. removed update_from_reg() function. it's not necessary, and it does too much. added code that announces on each local interface samba's ttl as zero and servertype as zero when nmbd is kill -TERMed first attempt at putting the first functionality of samba browsing back in (remote subnets should have samba appear in a workgroup specified through the lmhosts file) lots of other miscellaneous tidying up / chopping about. (This used to be commit 7e8c60cfe54060860e5ce20b1c3b8ec6aa5c54da) --- source3/script/mkproto.awk | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 78f3fa080b..200d5bd050 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -1,8 +1,3 @@ -# generate prototypes for Samba C code -# tridge, June 1996 -# added comment for each source file for use as crude index -# dan, 17 June 1996 - BEGIN { inheader=0; current_file=""; -- cgit From 2285033933448836e1c0e3e1c4b75da941a6c9b8 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Fri, 5 Jul 1996 03:51:27 +0000 Subject: Changed install scripts so they don't have hardcoded values Dan (This used to be commit 2eccc5eea289fa4b6af120d0bc92d568ca925482) --- source3/script/installbin.sh | 4 +++- source3/script/installman.sh | 37 ++++++++++++++++++++----------------- source3/script/installscripts.sh | 33 +++++++++++++++++++++++++-------- 3 files changed, 48 insertions(+), 26 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh index 633e6cb5bb..b976a3e5ea 100755 --- a/source3/script/installbin.sh +++ b/source3/script/installbin.sh @@ -34,7 +34,9 @@ done cat << EOF ====================================================================== The binaries are installed. You may restore the old binaries (if there -were any) using the command "make revert" +were any) using the command "make revert". You may uninstall the binaries +using the command "make uninstallbin" or "make uninstall" to uninstall +binaries, man pages and shell scripts. ====================================================================== EOF diff --git a/source3/script/installman.sh b/source3/script/installman.sh index a79d157c5f..3c8fc71865 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -1,4 +1,6 @@ #!/bin/sh +#5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values + MANDIR=$1 SRCDIR=$2 @@ -8,28 +10,29 @@ for d in $MANDIR $MANDIR/man1 $MANDIR/man5 $MANDIR/man7 $MANDIR/man8; do if [ ! -d $d ]; then mkdir $d if [ ! -d $d ]; then - echo Failed to make directory $d + echo Failed to make directory $d, does $USER have privileges? exit 1 fi fi done -cp $SRCDIR../docs/*.1 $MANDIR/man1 -cp $SRCDIR../docs/*.5 $MANDIR/man5 -cp $SRCDIR../docs/*.8 $MANDIR/man8 -cp $SRCDIR../docs/*.7 $MANDIR/man7 -echo Setting permissions on man pages -chmod 0644 $MANDIR/man1/smbstatus.1 -chmod 0644 $MANDIR/man1/smbclient.1 -chmod 0644 $MANDIR/man1/smbrun.1 -chmod 0644 $MANDIR/man1/testparm.1 -chmod 0644 $MANDIR/man1/testprns.1 -chmod 0644 $MANDIR/man1/smbtar.1 -chmod 0644 $MANDIR/man5/smb.conf.5 -chmod 0644 $MANDIR/man7/samba.7 -chmod 0644 $MANDIR/man8/smbd.8 -chmod 0644 $MANDIR/man8/nmbd.8 +for sect in 1 5 7 8 ; do + for m in $MANDIR/man$sect ; do + for s in $SRCDIR../docs/*$sect; do + FNAME=$m/`basename $s` + cp $s $m || echo Cannot create $FNAME... does $USER have privileges? + chmod 0644 $FNAME + done + done +done + +cat << EOF +====================================================================== +The man pages have been installed. You may uninstall them using the command +the command "make uninstallman" or make "uninstall" to uninstall binaries, +man pages and shell scripts. +====================================================================== +EOF -echo Man pages installed exit 0 diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh index c27d41c36b..ab9035ff81 100755 --- a/source3/script/installscripts.sh +++ b/source3/script/installscripts.sh @@ -1,26 +1,43 @@ #!/bin/sh # this script courtesy of James_K._Foote.PARC@xerox.com +# 5 July 96 Dan.Shearer@UniSA.Edu.Au Don't hardcode script names, get from Make + INSTALLPERMS=$1 BINDIR=$2 -SRCDIR=$3 + +shift +shift echo Installing scripts in $BINDIR -for d in $BINDIR; do +for d in [ $BINDIR ]; do if [ ! -d $d ]; then mkdir $d if [ ! -d $d ]; then echo Failed to make directory $d + echo Have you run installbin first? exit 1 fi fi done -cp ${SRCDIR}smbtar $BINDIR -cp ${SRCDIR}addtosmbpass $BINDIR -echo Setting permissions on scripts -chmod $INSTALLPERMS $BINDIR/smbtar -chmod $INSTALLPERMS $BINDIR/addtosmbpass +for p in $*; do + echo Installing $BINDIR/$p + cp $p $BINDIR/$p + if [ ! -f $BINDIR/$p ]; then + echo Cannot copy $p... does $USER have privileges? + fi + echo Setting permissions on $BINDIR/$p + chmod $INSTALLPERMS $BINDIR/$p +done + +cat << EOF +====================================================================== +The scripts have been installed. You may uninstall them using +the command "make uninstallscripts" or "make install" to install binaries, +man pages and shell scripts. You may recover the previous version (if any +by "make revert". +====================================================================== +EOF -echo Scripts installed exit 0 -- cgit From 4d314a96e76670f65bcd885d7bddfd7a137a4116 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Fri, 5 Jul 1996 03:53:32 +0000 Subject: Added uninstallation from Makefile, either in parts or total uninstall Dan (This used to be commit b6343dd09cdbc52677975405c2a85595ad152e8c) --- source3/script/uninstallbin.sh | 43 ++++++++++++++++++++++++++++++++++++++ source3/script/uninstallman.sh | 31 +++++++++++++++++++++++++++ source3/script/uninstallscripts.sh | 37 ++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100755 source3/script/uninstallbin.sh create mode 100755 source3/script/uninstallman.sh create mode 100755 source3/script/uninstallscripts.sh (limited to 'source3/script') diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh new file mode 100755 index 0000000000..fab36804a2 --- /dev/null +++ b/source3/script/uninstallbin.sh @@ -0,0 +1,43 @@ +#!/bin/sh +#4 July 96 Dan.Shearer@UniSA.edu.au + +INSTALLPERMS=$1 +BASEDIR=$2 +BINDIR=$3 +LIBDIR=$4 +VARDIR=$5 +shift +shift +shift +shift +shift + +if [ ! -d $BINDIR ]; then + echo Directory $BINDIR does not exist! + echo Do a "make installbin" or "make install" first. + exit 1 +fi + +for p in $*; do + if [ ! -f $BINDIR/$p ]; then + echo $BINDIR/$p does not exist! + else + echo Removing $BINDIR/$p + rm -f $BINDIR/$p + if [ -f $BINDIR/$p ]; then + echo Cannot remove $BINDIR/$p... does $USER have privileges? + fi + fi +done + + +cat << EOF +====================================================================== +The binaries have been uninstalled. You may restore the binaries using +the command "make installbin" or "make install" to install binaries, +man pages and shell scripts. You can restore a previous version of the +binaries (if there were any) using "make revert". +====================================================================== +EOF + +exit 0 diff --git a/source3/script/uninstallman.sh b/source3/script/uninstallman.sh new file mode 100755 index 0000000000..b4d4bfc1f9 --- /dev/null +++ b/source3/script/uninstallman.sh @@ -0,0 +1,31 @@ +#!/bin/sh +#4 July 96 Dan.Shearer@UniSA.edu.au + +MANDIR=$1 +SRCDIR=$2 + +echo Uninstalling man pages from $MANDIR + +for sect in 1 5 7 8 ; do + for m in $MANDIR/man$sect ; do + for s in $SRCDIR../docs/*$sect; do + FNAME=$m/`basename $s` + if test -f $FNAME; then + echo Deleting $FNAME + rm -f $FNAME + test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges? + else + echo $FNAME does not exist! Check defines in the Makefile + fi + done + done +done + +cat << EOF +====================================================================== +The man pages have been uninstalled. You may install them again using +the command "make installman" or make "install" to install binaries, +man pages and shell scripts. +====================================================================== +EOF +exit 0 diff --git a/source3/script/uninstallscripts.sh b/source3/script/uninstallscripts.sh new file mode 100755 index 0000000000..ae907546f2 --- /dev/null +++ b/source3/script/uninstallscripts.sh @@ -0,0 +1,37 @@ +#!/bin/sh +# 5 July 96 Dan.Shearer@UniSA.Edu.Au - almost identical to uninstallbin.sh + +INSTALLPERMS=$1 +BINDIR=$2 + +shift +shift + +if [ ! -d $BINDIR ]; then + echo Directory $BINDIR does not exist! + echo Do a "make installscripts" or "make install" first. + exit 1 +fi + +for p in $*; do + if [ ! -f $BINDIR/$p ]; then + echo $BINDIR/$p does not exist! + else + echo Removing $BINDIR/$p + rm -f $BINDIR/$p + if [ -f $BINDIR/$p ]; then + echo Cannot remove $BINDIR/$p... does $USER have privileges? + fi + fi +done + +cat << EOF +====================================================================== +The scripts have been uninstalled. You may reinstall them using +the command "make installscripts" or "make install" to install binaries, +man pages and shell scripts. You may recover a previous version (if any +with "make revert". +====================================================================== +EOF + +exit 0 -- cgit From 47673b32ed4a907b380b70d5f4f366ba8be301d2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 15 Aug 1996 15:11:34 +0000 Subject: - added FAST_SHARE_MODES code - added some named pipe code from Jim (This used to be commit c94866e9e44ea1eb72da06bc65ef1c032ae8e0c9) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 200d5bd050..08b13d4610 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -64,7 +64,7 @@ BEGIN { next; } -!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time/ { +!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^shm_offset_t/ { next; } -- cgit From 5dd45b8ae5af23f315931b436c377bff6b2a282e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 16 Aug 1996 13:09:59 +0000 Subject: fixed installscripts.sh so it no longer creates ] and [ directories every time its run! (This used to be commit f84199aad60c10a24f66a1270a6f7157600d0fca) --- source3/script/installscripts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh index ab9035ff81..1a230c8cfa 100755 --- a/source3/script/installscripts.sh +++ b/source3/script/installscripts.sh @@ -10,7 +10,7 @@ shift echo Installing scripts in $BINDIR -for d in [ $BINDIR ]; do +for d in $BINDIR; do if [ ! -d $d ]; then mkdir $d if [ ! -d $d ]; then -- cgit From 28177ca73bdbe3f8fb17a608db3df1a39e0e37a4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 17 Aug 1996 11:37:44 +0000 Subject: - added support for Amiga-unix (based on BSD I think) - changed the order of PROGS and SPROGS in Makefile (SPROGS first) - another 64 bit cleanup (for INADDR_NONE) - added paranoia code in DirCacheAdd() to detect looping - fixed important DirCache flush bug - rewrote the NetServerEnum code after I found it could return servers from multiple workgroups at once, and this could cause browsing havoc. Now a null workgroup query is equivalent to a query for the servers primary workgroup - got rid of my_workgroup() - got rid of "workgroup = *" comment in Makefile. We no longer support a workgroup of *, users must set the workgroup explicitly - the wins.dat file was being stored in a different format to what it was being loaded in - this could cause havoc. fixed. - uppercase our netbios name and the workgroup name at startup - if accept fails in main loop when running as a daemon then continue, don't just exit! - don't use ./ on smbclient in smbtar - better code to detect if a process exists (This used to be commit ec3d53963064b50ff33e8eff47812aac82f164ba) --- source3/script/smbtar | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/smbtar b/source3/script/smbtar index 156375ce9c..a947476dc6 100644 --- a/source3/script/smbtar +++ b/source3/script/smbtar @@ -11,8 +11,8 @@ case $0 in # when called by absolute path, assume smbclient is in the same directory /*) SMBCLIENT="`dirname $0`/smbclient";; - *) # edit this to show where your smbclient is - SMBCLIENT="./smbclient";; + *) # you may need to edit this to show where your smbclient is + SMBCLIENT="smbclient";; esac # These are the default values. You could fill them in if you know what -- cgit From 22e4d4e9d44577593d53ad84e77c9c078774d2e9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 28 Aug 1997 02:22:44 +0000 Subject: added a new type to mkproto.awk so it can handle shmem.c in general if you add a new type that is returned by a non-static function then just add it to the list of known types in mkproto.awk (This used to be commit 1d4ce07435f3d6dac41a2616a044bcd441dbaced) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 08b13d4610..88d81a62cd 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -64,7 +64,7 @@ BEGIN { next; } -!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^shm_offset_t/ { +!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t/ { next; } -- cgit From 57408548f3cc717116b5eb3fe7381f0568ac473d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 30 Aug 1997 01:13:39 +0000 Subject: Adding codepage definition files and codepage file compiler/decompiler. Adding install/uninstall scripts for compiled codepage files. Preparing for dynamic codepage loading. Jeremy (jallison@whistle.com) (This used to be commit e3fc9533bd87d0d520e3dac98261e42370907b11) --- source3/script/installcp.sh | 36 ++++++++++++++++++++++++++++++++++++ source3/script/uninstallcp.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100755 source3/script/installcp.sh create mode 100755 source3/script/uninstallcp.sh (limited to 'source3/script') diff --git a/source3/script/installcp.sh b/source3/script/installcp.sh new file mode 100755 index 0000000000..bafd84146d --- /dev/null +++ b/source3/script/installcp.sh @@ -0,0 +1,36 @@ +#!/bin/sh +LIBDIR=$1 +CODEPAGEDIR=$2 +BINDIR=$3 + +shift +shift +shift + +echo Installing codepage files in $CODEPAGEDIR +for d in $LIBDIR $CODEPAGEDIR; do +if [ ! -d $d ]; then +mkdir $d +if [ ! -d $d ]; then + echo Failed to make directory $d + exit 1 +fi +fi +done + +for p in $*; do + echo Creating codepage file $CODEPAGEDIR/codepage.$p from codepage_def.$p + $BINDIR/make_smbcodepage c $p codepage_def.$p $CODEPAGEDIR/codepage.$p +done + + +cat << EOF +====================================================================== +The code pages have been installed. You may uninstall them using the command +the command "make uninstallcp" or make "uninstall" to uninstall binaries, +man pages, shell scripts and code pages. +====================================================================== +EOF + +exit 0 + diff --git a/source3/script/uninstallcp.sh b/source3/script/uninstallcp.sh new file mode 100755 index 0000000000..bd7013c358 --- /dev/null +++ b/source3/script/uninstallcp.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +CPDIR=$1 +shift + +if [ ! -d $CPDIR ]; then + echo Directory $CPDIR does not exist! + echo Do a "make installcp" or "make install" first. + exit 1 +fi + +for p in $*; do + if [ ! -f $CPDIR/codepage.$p ]; then + echo $CPDIR/codepage.$p does not exist! + else + echo Removing $CPDIR/codepage.$p + rm -f $CPDIR/codepage.$p + if [ -f $CPDIR/codepage.$p ]; then + echo Cannot remove $CPDIR/codepage.$p... does $USER have privileges? + fi + fi +done + +cat << EOF +====================================================================== +The code pages have been uninstalled. You may reinstall them using +the command "make installcp" or "make install" to install binaries, +man pages, shell scripts and code pages. You may recover a previous version +(if any with "make revert"). +====================================================================== +EOF + +exit 0 -- cgit From f5302af621d91536a72b437ae2b80f9dedb46920 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 4 Sep 1997 20:26:07 +0000 Subject: Fixed up determination of client type for PROTOCOL_NT1. Uses client capabilities bits in session_setup_and_X to decide. Made remote_arch an enum as well as a string, for easier use. Jeremy (jallison@whistle.com) (This used to be commit 99080705a2d0adcb25e1eecbe517a2fac2779baa) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 88d81a62cd..f2b76f20c9 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -64,7 +64,7 @@ BEGIN { next; } -!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t/ { +!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types/ { next; } -- cgit From a2d2206cc941f39df8713d9cee26099f603af82f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Sep 1997 17:12:08 +0000 Subject: Makefile: Changed proto: target to not include c files not used currently. Caused proto.h to be from a sorted list of C files. arcfour.h: Added prototypes. client.c: Added username%password in environment patch from John Blair loadparm.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au] username.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au] mkproto.awk: Added arc4_key type. proto.h: Updated & sorted. Jeremy (jallison@whistle.com) (This used to be commit 97ed4fea67095dfb83227e7b5fffc236ff277e02) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index f2b76f20c9..1ccf2fb2b0 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -64,7 +64,7 @@ BEGIN { next; } -!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types/ { +!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|arc4_key/ { next; } -- cgit From a9e1efc1adb9a1cd85222f992c9ea03b56e74125 Mon Sep 17 00:00:00 2001 From: John Terpstra Date: Tue, 7 Oct 1997 16:01:08 +0000 Subject: JHT ==> Fixing blocksize argument. Patch by: Llyod Whiteman (This used to be commit 67c1e87e8fda724da6dd3663641639167dd33a16) --- source3/script/smbtar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/smbtar b/source3/script/smbtar index a947476dc6..dcf01edb20 100644 --- a/source3/script/smbtar +++ b/source3/script/smbtar @@ -88,7 +88,7 @@ while getopts rivl:b:d:N:s:p:x:u:Xt: c; do server="$OPTARG" ;; b) # specify [b]locksize - blocksize="blocksize $OPTARG" + blocksize="$OPTARG" case "$OPTARG" in [0-9]*) ;; *) echo >&2 "$0: Error, block size not numeric: -b $OPTARG" -- cgit From ceb047f60105b0390088ffc34813148d5e13cfa5 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 1 Dec 1997 15:21:23 +0000 Subject: remove stutter from closing instructions (This used to be commit 358fcbf2e4ca274d7ef34e3cac0bc7fd72732ec5) --- source3/script/installcp.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installcp.sh b/source3/script/installcp.sh index bafd84146d..c4f917113b 100755 --- a/source3/script/installcp.sh +++ b/source3/script/installcp.sh @@ -26,8 +26,8 @@ done cat << EOF ====================================================================== -The code pages have been installed. You may uninstall them using the command -the command "make uninstallcp" or make "uninstall" to uninstall binaries, +The code pages have been installed. You may uninstall them using the +command "make uninstallcp" or make "uninstall" to uninstall binaries, man pages, shell scripts and code pages. ====================================================================== EOF -- cgit From fdeea341ed1bae670382e45eb731db1b5838ad21 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 11 Mar 1998 21:11:04 +0000 Subject: "For I have laboured mightily on Luke's code, and hath broken all I saw" - the book of Jeremy, chapter 1 :-). So here is the mega-merge of the NTDOM branch server code. It doesn't include the new client side pieces, we'll look at that later. This should give the same functionality, server wise, as the NTDOM branch does, only merged into the main branch. Any fixes to domain controler functionality should be added to the main branch, not the NTDOM branch. This code compiles without warnings on gcc2.8, but will need further testing before we are sure all the working functionality of the NTDOM server branch has been correctly carried over. I hereby declare the server side of the NTDOM branch dead (and all who sail in her :-). Jeremy. (This used to be commit 118ba4d77a33248e762a2cf843fb7cbc906ee6e7) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 1ccf2fb2b0..bbbbc9029e 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -64,7 +64,7 @@ BEGIN { next; } -!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|arc4_key/ { +!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^arc4_key|^FILE/ { next; } -- cgit From e5edc3e9f3008fbff8786be4650dd4e5aa7b152d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 12 Mar 1998 03:12:30 +0000 Subject: added an install target for SWAT (This used to be commit 1a87b2c2b61b3785b6a6597b220fec611c5872e6) --- source3/script/installswat.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 source3/script/installswat.sh (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh new file mode 100755 index 0000000000..dcdfc530b4 --- /dev/null +++ b/source3/script/installswat.sh @@ -0,0 +1,41 @@ +#!/bin/sh +#fist version March 1998, Andrew Tridgell + +SWATDIR=$1 +SRCDIR=$2 + +echo Installing the Samba Web Admisistration Tool + +for d in $SWATDIR $SWATDIR/help $SWATDIR/images; do +if [ ! -d $d ]; then + mkdir $d +if [ ! -d $d ]; then + echo Failed to make directory $d, does $USER have privileges? + exit 1 +fi +fi +done + +for f in $SRCDIR../swat/images/*.gif; do + FNAME=$SWATDIR/images/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME +done + +for f in $SRCDIR../swat/help/*.html; do + FNAME=$SWATDIR/help/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME +done + +cat << EOF +====================================================================== +The SWAT files have been installed. Remember to read the web/README +for information on enabling and using SWAT +====================================================================== +EOF + +exit 0 + -- cgit From b56333a181dffa1d6880ca359e0327b2eb0448e4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 14 Mar 1998 01:26:46 +0000 Subject: fixed instructions in installswat.sh (thanks to Herb again!) (This used to be commit 5e25c845c7c9fe3330cd84e84cfc9b08d77d8cc3) --- source3/script/installswat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index dcdfc530b4..30dd2b57be 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -32,7 +32,7 @@ done cat << EOF ====================================================================== -The SWAT files have been installed. Remember to read the web/README +The SWAT files have been installed. Remember to read the swat/README for information on enabling and using SWAT ====================================================================== EOF -- cgit From 69bb6f6f5fa472d2bf5c619a09aecc3b0ce4c254 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 15 Mar 1998 00:03:38 +0000 Subject: install jpeg files (This used to be commit 02cb3801d772cc056df3afb7028d9bd74c8553be) --- source3/script/installswat.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 30dd2b57be..a51fd56272 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -23,6 +23,13 @@ for f in $SRCDIR../swat/images/*.gif; do chmod 0644 $FNAME done +for f in $SRCDIR../swat/images/*.jpg; do + FNAME=$SWATDIR/images/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME +done + for f in $SRCDIR../swat/help/*.html; do FNAME=$SWATDIR/help/`basename $f` echo $FNAME -- cgit From 7c57040da126588dc4bb14051c110718adc3c550 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 9 Apr 1998 00:42:23 +0000 Subject: Removed unneeded proto symbol. Jeremy. (This used to be commit 6ed3de711858fde6fa8085e9439aae3bbf6ecda1) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index bbbbc9029e..6e1242b84f 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -64,7 +64,7 @@ BEGIN { next; } -!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^arc4_key|^FILE/ { +!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { next; } -- cgit From f004d84f683673b7cb167320e3e78a3fcefdfd07 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Mon, 11 May 1998 15:56:01 +0000 Subject: ldap back-end database development Makefile: created PASSBD_OBJ group includes.h: added #ifdef USE_LDAP to #include headers ldap.c: - renamed "_machine" to "_trust" everywhere. - added sam_passwd support routines - removed get_ldappwd_entry function: replaced with get_sampwd_entry - removed getldappwnam/uid: replaced with getsampwnam/uid - other messing about bits which are probably going to annoy the hell out of jean-francois (sorry!) mkproto.awk: - added stuff to wrap ldap.c protos with #ifdef USE_LDAP - added uid_t and gid_t return results to the prototype generation passdb.c: - created getsam21pwent, add_sam21pwd_entry, mod_sam21pwd_entry. - modified getsampwnam/uid and created getsam21pwnam/rid functions to replace the local get_smbpwd_entry() and get_ldappwd_entry() functions, which jeremy didn't like anyway because they were dual-purpose. - added utility routines which are or may be useful to all the password database routines. password.c: - renamed "machine_" to "trust_" everywhere. smbpass.c: - removed get_smbpwd_entry function: replaced it with get_sampwd_entry functions in passdb.c - moved code that decoded acct_ctrl into passdb.c - moved encode_acct_ctrl into passdb.c - removed getsmbpwnam/uid: replaced with getsampwnam/uid - renamed "machine_" to "trust_" everywhere. smbpasswd.c: - renamed "machine_" to "trust_" everywhere. util.c: - moved gethexpwd function into passdb.c lib/rpc/server/srv_util.c: - moved user_rid_to_uid, group_rid_to_rid etc etc into passdb.c (This used to be commit 673ab50c4c2c25db355d90efde3a6bfbb4d8369e) --- source3/script/mkproto.awk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 6e1242b84f..b1c7f79c18 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -1,5 +1,6 @@ BEGIN { inheader=0; + use_ldap_define = 0; current_file=""; print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */" print "" @@ -7,10 +8,19 @@ BEGIN { { if (FILENAME!=current_file) { + if (use_ldap_define) + { + print "#endif /* USE_LDAP */" + use_ldap_define = 0; + } print "" print "/*The following definitions come from ",FILENAME," */" print "" current_file=FILENAME + if (current_file=="ldap.c") { + print "#ifdef USE_LDAP" + use_ldap_define = 1; + } } if (inheader) { if (match($0,"[)][ \t]*$")) { @@ -64,7 +74,7 @@ BEGIN { next; } -!/^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { +!/^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { next; } -- cgit From 90e97bf9c550b05af643651c439c602e1924a9d3 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Fri, 15 May 1998 14:47:01 +0000 Subject: two scripts from benny holmgren which a) create NIS+ table b) populate it from private/smbpasswd. (This used to be commit 1acdd9fd6c391ad4871c55c0ba8f5b00076ba115) --- source3/script/mknissmbpasswd.sh | 29 +++++++++++++++++++++++++++++ source3/script/mknissmbpwdtbl.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100755 source3/script/mknissmbpasswd.sh create mode 100755 source3/script/mknissmbpwdtbl.sh (limited to 'source3/script') diff --git a/source3/script/mknissmbpasswd.sh b/source3/script/mknissmbpasswd.sh new file mode 100755 index 0000000000..e7b3df1f83 --- /dev/null +++ b/source3/script/mknissmbpasswd.sh @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Script to import smbpasswd file into the smbpasswd NIS+ table. Reads +# from stdin the smbpasswd file. +# +while true +do + read row + if [ -z "$row" ] + then + break + fi + + if [ "`echo $row | cut -c1`" = "#" ] + then + continue + fi + + nistbladm -a \ + name=\"`echo $row | cut -d: -f1`\" \ + uid=\"`echo $row | cut -d: -f2`\" \ + lmpwd=\"`echo $row | cut -d: -f3`\" \ + ntpwd=\"`echo $row | cut -d: -f4`\" \ + acb=\"`echo $row | cut -d: -f5`\" \ + pwdlset_t=\"`echo $row | cut -d: -f6`\" \ + gcos=\"`echo $row | cut -d: -f7`\" \ + home=\"`echo $row | cut -d: -f8`\" \ + shell=\"`echo $row | cut -d: -f9`\" smbpasswd.org_dir.`nisdefaults -d` +done diff --git a/source3/script/mknissmbpwdtbl.sh b/source3/script/mknissmbpwdtbl.sh new file mode 100755 index 0000000000..a98aa572e3 --- /dev/null +++ b/source3/script/mknissmbpwdtbl.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# +# Creates smbpasswd table and smb group in NIS+ +# + +nistbladm \ + -D access=og=rmcd,nw= -c \ + -s : smbpasswd_tbl \ + name=S,nogw=r \ + uid=S,nogw=r \ + user_rid=S,nogw=r \ + smb_grpid=,nw+r \ + group_rid=,nw+r \ + acb=,nw+r \ + \ + lmpwd=C,nw=,g=r,o=rm \ + ntpwd=C,nw=,g=r,o=rm \ + \ + logon_t=,nw+r \ + logoff_t=,nw+r \ + kick_t=,nw+r \ + pwdlset_t=,nw+r \ + pwdlchg_t=,nw+r \ + pwdmchg_t=,nw+r \ + \ + full_name=,nw+r \ + home_dir=,nw+r \ + dir_drive=,nw+r \ + logon_script=,nw+r \ + profile_path=,nw+r \ + acct_desc=,nw+r \ + workstations=,nw+r \ + \ + hours=,nw+r \ + smbpasswd.org_dir.`nisdefaults -d` + +nisgrpadm -c smb.`nisdefaults -d` + +nischgrp smb.`nisdefaults -d` smbpasswd.org_dir.`nisdefaults -d` + -- cgit From d36a24d2c80e0d1dc1c0472e90092fcdeef89b9c Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Fri, 15 May 1998 14:48:25 +0000 Subject: adding copyright messages for Benny Holmgren (This used to be commit d7ed2ee35c76a19e93453c23b5e56874b72cc0e5) --- source3/script/mknissmbpasswd.sh | 2 ++ source3/script/mknissmbpwdtbl.sh | 2 ++ 2 files changed, 4 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mknissmbpasswd.sh b/source3/script/mknissmbpasswd.sh index e7b3df1f83..a94c963bdc 100755 --- a/source3/script/mknissmbpasswd.sh +++ b/source3/script/mknissmbpasswd.sh @@ -1,5 +1,7 @@ #!/bin/sh # +# Copyright (C) 1998 Benny Holmgren +# # Script to import smbpasswd file into the smbpasswd NIS+ table. Reads # from stdin the smbpasswd file. # diff --git a/source3/script/mknissmbpwdtbl.sh b/source3/script/mknissmbpwdtbl.sh index a98aa572e3..a9b34ff9a7 100755 --- a/source3/script/mknissmbpwdtbl.sh +++ b/source3/script/mknissmbpwdtbl.sh @@ -1,5 +1,7 @@ #!/bin/sh # +# Copyright (C) 1998 Benny Holmgren +# # Creates smbpasswd table and smb group in NIS+ # -- cgit From 32954eb9e9eb1e3613ad55cb1afd5e19e81b5da8 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Mon, 18 May 1998 11:54:00 +0000 Subject: Makefile: - added nisppass.c and NISPLUS_FLAGS includes.h: - renamed USE_LDAP to USE_LDAP_DB. renamed NISPLUS to USE_NISPLUS_DB. added default define of USE_SMBPASS_DB. - removed ldap headers: they are local only to ldap.c ldap.c : - made all ldap-specific functions static. - added dummy sam21 functions loadparm.c : - renamed NISPLUS to NISPLUS_HOME mkproto.awk - commented out ldap-specific #ifdef generation code: it's not needed now that ldap-specific functions in ldap.c are static nisppass.c : - first attempt at an add function from (This used to be commit f215d375f0f1e12894c2a9e86bd28d4776d337c1) --- source3/script/mkproto.awk | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index b1c7f79c18..e5f0c11477 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -1,6 +1,6 @@ BEGIN { inheader=0; - use_ldap_define = 0; +# use_ldap_define = 0; current_file=""; print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */" print "" @@ -8,19 +8,19 @@ BEGIN { { if (FILENAME!=current_file) { - if (use_ldap_define) - { - print "#endif /* USE_LDAP */" - use_ldap_define = 0; - } +# if (use_ldap_define) +# { +# print "#endif /* USE_LDAP */" +# use_ldap_define = 0; +# } print "" print "/*The following definitions come from ",FILENAME," */" print "" current_file=FILENAME - if (current_file=="ldap.c") { - print "#ifdef USE_LDAP" - use_ldap_define = 1; - } +# if (current_file=="ldap.c") { +# print "#ifdef USE_LDAP" +# use_ldap_define = 1; +# } } if (inheader) { if (match($0,"[)][ \t]*$")) { -- cgit From 1c185427fa1cd5fa54ce7781bb57ff1df3c99de4 Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Mon, 8 Jun 1998 14:59:30 +0000 Subject: Added code to generate #ifndef _PROTO_H_ #define _PROTO_H_ : : #endif /* _PROTO_H_ */ in the appropriate places. This required that I add an END rule. I generated a new proto.h and diff'ed it against the previous. There were no differences except for the added lines. Chris -)----- (This used to be commit 6d4d0dc7e65f946f09d127969ccbb4b51dfd6a4e) --- source3/script/mkproto.awk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index e5f0c11477..5505878b37 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -2,10 +2,16 @@ BEGIN { inheader=0; # use_ldap_define = 0; current_file=""; + print "#ifndef _PROTO_H_" + print "#define _PROTO_H_" print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */" print "" } +END { + print "#endif /* _PROTO_H_ */" +} + { if (FILENAME!=current_file) { # if (use_ldap_define) -- cgit From 5b11dbd8f66040de091b705a5814566e029a6fa6 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Mon, 6 Jul 1998 22:25:56 +0000 Subject: Digital UNIX does not seem to set OPTIND if there are no command line parameters. Added simple code to smbtar to check for paramters and pump out a usage message if there are none. Regards Richard (This used to be commit 52cf030b9d0ea4f3b68d7a3fccfe3841930a329a) --- source3/script/smbtar | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/script') diff --git a/source3/script/smbtar b/source3/script/smbtar index dcf01edb20..20422b0334 100644 --- a/source3/script/smbtar +++ b/source3/script/smbtar @@ -54,6 +54,16 @@ Options: (Description) (Default) exit $ex } +echo Params count: $# + +# DEC OSF AKA Digital UNIX does not seem to return a value in OPTIND if +# there are no command line params, so protect us against that ... +if [ $# = 0 ]; then + + Usage 2 "Please enter a command line parameter!" + +fi + while getopts rivl:b:d:N:s:p:x:u:Xt: c; do case $c in r) # [r]estore to Windows (instead of the default "Save from Windows") -- cgit From 64578c0589a3a741f81fb55c16eeb882128da00b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 29 Jul 1998 03:08:05 +0000 Subject: merge from the autoconf2 branch to the main branch (This used to be commit 3bda7ac417107a7b01d91805ca71c4330657ed21) --- source3/script/installman.sh | 2 +- source3/script/installswat.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 3c8fc71865..95611dcc22 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -2,7 +2,7 @@ #5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values MANDIR=$1 -SRCDIR=$2 +SRCDIR=$2/ echo Installing man pages in $MANDIR diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index a51fd56272..93f534fd72 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -2,7 +2,9 @@ #fist version March 1998, Andrew Tridgell SWATDIR=$1 -SRCDIR=$2 +SRCDIR=$2/ + +echo Installing SWAT in $SWATDIR echo Installing the Samba Web Admisistration Tool -- cgit From 27ff18a184556f1e157de7c2789f39e3e70a40fc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 9 Aug 1998 11:24:15 +0000 Subject: these dummy files are needed for autoconf processing (This used to be commit be762dc3de6c1ef768790522dfe93007a61ce5d7) --- source3/script/dummy.in | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 source3/script/dummy.in (limited to 'source3/script') diff --git a/source3/script/dummy.in b/source3/script/dummy.in new file mode 100644 index 0000000000..e69de29bb2 -- cgit From 87bcd5502c105921b48f9654d1c4f6d14ed9e9f6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 9 Aug 1998 11:25:49 +0000 Subject: added ignore rules for the dummy files (This used to be commit 687f76a17d6d3ebd33b4d9a848deef56f3c1f56a) --- source3/script/.cvsignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 source3/script/.cvsignore (limited to 'source3/script') diff --git a/source3/script/.cvsignore b/source3/script/.cvsignore new file mode 100644 index 0000000000..421376db9e --- /dev/null +++ b/source3/script/.cvsignore @@ -0,0 +1 @@ +dummy -- cgit From 1c6f52cc284a75e304d10c098088c1c846c9efc8 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 10 Aug 1998 01:55:42 +0000 Subject: fixed the installation scripts for the new layout (This used to be commit 60cdb83f3f6dfd7755e46254662245a82a8ef498) --- source3/script/installbin.sh | 12 +++++++----- source3/script/installcp.sh | 4 ++-- source3/script/installman.sh | 1 + source3/script/installscripts.sh | 15 +++++++++------ source3/script/revert.sh | 13 ++++++++----- source3/script/uninstallbin.sh | 13 ++++++------- source3/script/uninstallman.sh | 4 +--- source3/script/uninstallscripts.sh | 13 ++++++------- 8 files changed, 40 insertions(+), 35 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh index b976a3e5ea..22771ce5a0 100755 --- a/source3/script/installbin.sh +++ b/source3/script/installbin.sh @@ -1,4 +1,5 @@ #!/bin/sh + INSTALLPERMS=$1 BASEDIR=$2 BINDIR=$3 @@ -22,12 +23,13 @@ done for p in $*; do - echo Installing $p as $BINDIR/$p - if [ -f $BINDIR/$p ]; then - mv $BINDIR/$p $BINDIR/$p.old + p2=`basename $p` + echo Installing $p as $BINDIR/$p2 + if [ -f $BINDIR/$p2 ]; then + mv $BINDIR/$p2 $BINDIR/$p2.old fi - cp $p $BINDIR/$p - chmod $INSTALLPERMS $BINDIR/$p + cp $p $BINDIR/ + chmod $INSTALLPERMS $BINDIR/$p2 done diff --git a/source3/script/installcp.sh b/source3/script/installcp.sh index c4f917113b..d1bc7f6291 100755 --- a/source3/script/installcp.sh +++ b/source3/script/installcp.sh @@ -19,8 +19,8 @@ fi done for p in $*; do - echo Creating codepage file $CODEPAGEDIR/codepage.$p from codepage_def.$p - $BINDIR/make_smbcodepage c $p codepage_def.$p $CODEPAGEDIR/codepage.$p + echo Creating codepage file $CODEPAGEDIR/codepage.$p + $BINDIR/make_smbcodepage c $p codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p done diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 95611dcc22..12a63e26c0 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -20,6 +20,7 @@ for sect in 1 5 7 8 ; do for m in $MANDIR/man$sect ; do for s in $SRCDIR../docs/*$sect; do FNAME=$m/`basename $s` + echo Installing $FNAME cp $s $m || echo Cannot create $FNAME... does $USER have privileges? chmod 0644 $FNAME done diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh index 1a230c8cfa..6d55317e9e 100755 --- a/source3/script/installscripts.sh +++ b/source3/script/installscripts.sh @@ -22,13 +22,16 @@ for d in $BINDIR; do done for p in $*; do - echo Installing $BINDIR/$p - cp $p $BINDIR/$p - if [ ! -f $BINDIR/$p ]; then - echo Cannot copy $p... does $USER have privileges? + p2=`basename $p` + echo Installing $BINDIR/$p2 + if [ -f $BINDIR/$p2 ]; then + mv $BINDIR/$p2 $BINDIR/$p2.old + fi + cp $p $BINDIR/ + chmod $INSTALLPERMS $BINDIR/$p2 + if [ ! -f $BINDIR/$p2 ]; then + echo Cannot copy $p2... does $USER have privileges? fi - echo Setting permissions on $BINDIR/$p - chmod $INSTALLPERMS $BINDIR/$p done cat << EOF diff --git a/source3/script/revert.sh b/source3/script/revert.sh index 68b47bf39d..8df5fd2fbd 100755 --- a/source3/script/revert.sh +++ b/source3/script/revert.sh @@ -3,11 +3,14 @@ BINDIR=$1 shift for p in $*; do - if [ -f $BINDIR/$p.old ]; then - echo Restoring $BINDIR/$p.old as $BINDIR/$p - mv $BINDIR/$p $BINDIR/$p.new - mv $BINDIR/$p.old $BINDIR/$p - rm -f $BINDIR/$p.new + p2=`basename $p` + if [ -f $BINDIR/$p2.old ]; then + echo Restoring $BINDIR/$p2.old + mv $BINDIR/$p2 $BINDIR/$p2.new + mv $BINDIR/$p2.old $BINDIR/$p2 + rm -f $BINDIR/$p2.new + else + echo Not restoring $p fi done diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh index fab36804a2..53775f8946 100755 --- a/source3/script/uninstallbin.sh +++ b/source3/script/uninstallbin.sh @@ -19,13 +19,12 @@ if [ ! -d $BINDIR ]; then fi for p in $*; do - if [ ! -f $BINDIR/$p ]; then - echo $BINDIR/$p does not exist! - else - echo Removing $BINDIR/$p - rm -f $BINDIR/$p - if [ -f $BINDIR/$p ]; then - echo Cannot remove $BINDIR/$p... does $USER have privileges? + p2=`basename $p` + if [ -f $BINDIR/$p2 ]; then + echo Removing $BINDIR/$p2 + rm -f $BINDIR/$p2 + if [ -f $BINDIR/$p2 ]; then + echo Cannot remove $BINDIR/$p2 ... does $USER have privileges? fi fi done diff --git a/source3/script/uninstallman.sh b/source3/script/uninstallman.sh index b4d4bfc1f9..b6d2524ec7 100755 --- a/source3/script/uninstallman.sh +++ b/source3/script/uninstallman.sh @@ -8,14 +8,12 @@ echo Uninstalling man pages from $MANDIR for sect in 1 5 7 8 ; do for m in $MANDIR/man$sect ; do - for s in $SRCDIR../docs/*$sect; do + for s in $SRCDIR/../docs/*$sect; do FNAME=$m/`basename $s` if test -f $FNAME; then echo Deleting $FNAME rm -f $FNAME test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges? - else - echo $FNAME does not exist! Check defines in the Makefile fi done done diff --git a/source3/script/uninstallscripts.sh b/source3/script/uninstallscripts.sh index ae907546f2..13104acedd 100755 --- a/source3/script/uninstallscripts.sh +++ b/source3/script/uninstallscripts.sh @@ -14,13 +14,12 @@ if [ ! -d $BINDIR ]; then fi for p in $*; do - if [ ! -f $BINDIR/$p ]; then - echo $BINDIR/$p does not exist! - else - echo Removing $BINDIR/$p - rm -f $BINDIR/$p - if [ -f $BINDIR/$p ]; then - echo Cannot remove $BINDIR/$p... does $USER have privileges? + p2=`basename $p` + if [ -f $BINDIR/$p2 ]; then + echo Removing $BINDIR/$p2 + rm -f $BINDIR/$p2 + if [ -f $BINDIR/$p2 ]; then + echo Cannot remove $BINDIR/$p2 ... does $USER have privileges? fi fi done -- cgit From b9623ab59e813131b1ed3f51616a46e719d59c21 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 14 Aug 1998 17:38:29 +0000 Subject: this is the bug change to using connection_struct* instead of cnum. Connections[] is now a local array in server.c I might have broken something with this change. In particular the oplock code is suspect and some .dll files aren't being oplocked when I expected them to be. I'll look at it after I've got some sleep. (This used to be commit c7ee025ead4a85b6fa44a832047b878451845fb6) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 5505878b37..28a68e29e2 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -80,7 +80,7 @@ END { next; } -!/^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { +!/^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { next; } -- cgit From 127655cc888ac40332d4e8e5b94aab03f5120aae Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 15 Aug 1998 07:27:34 +0000 Subject: this checkin gets rid of the global Files[] array and makes it local in files.c it should now be faily easy to expand the default MAX_OPEN_FILES to many thousands. (This used to be commit b088c804f98908eb02f05ab2f2e8a61691a0a582) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 28a68e29e2..0b963cbc80 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -80,7 +80,7 @@ END { next; } -!/^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { +!/^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { next; } -- cgit From f2d538a105a61ce6d2852700fc328e15ac158827 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 17 Aug 1998 03:06:20 +0000 Subject: some cleanups from the conversion of Pipes[] to a linked list. I also removed most cases where a pnum is used and substituted a pipes_struct*. in files.c I added a offset of 0x1000 to all file handles on the wire. This makes it much less likely that bad parsing will give us the wrong field. (This used to be commit 8bc2627ff28d340db65bfa017daca2dc291d5ef7) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 0b963cbc80..b998de2dcc 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -80,7 +80,7 @@ END { next; } -!/^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { +!/^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { next; } -- cgit From 983dc71c9844675ad364f3ea59ddd04b87857b55 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 17 Aug 1998 06:13:32 +0000 Subject: moved connection_struct handling code into smbd/conn.c and changed it to a linked list with bitmap format. (This used to be commit b7aaab1b6b2d2f72b2bb7c11f5c7bf081a6093d9) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index b998de2dcc..238bd8e0f6 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -80,7 +80,7 @@ END { next; } -!/^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { +!/^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { next; } -- cgit From 04c4ca1b241f3ef49e4a626c35141fea3cb1099a Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Fri, 21 Aug 1998 09:01:30 +0000 Subject: Submitting the smbtar changes to the main branch as well. Regards Richard Sharpe (This used to be commit 749ec1e0a79c5836bba0fc0213576ed79ef761d5) --- source3/script/smbtar | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/smbtar b/source3/script/smbtar index 20422b0334..25c36b2a8f 100644 --- a/source3/script/smbtar +++ b/source3/script/smbtar @@ -6,6 +6,10 @@ # and Ricky Poulten (ricky@logcam.co.uk) # # (May need to change shell to ksh for HPUX or OSF for better getopts) +# +# Richard Sharpe, added -c 'tarmode full' so that we back up all files to +# fix a bug in clitar when a patch was added to stop system and hidden files +# being backed up. case $0 in # when called by absolute path, assume smbclient is in the same directory @@ -25,6 +29,7 @@ verbose="2>/dev/null" # Default: no echo to stdout log="-d 2" newer="" blocksize="" +clientargs="-c 'tarmode full'" tarcmd="c" tarargs="" cdcmd="\\" @@ -145,6 +150,6 @@ if [ -z "$verbose" ]; then fi eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \ --E -N $log -D "'$cdcmd'" \ +-E -N $log -D "'$cdcmd'" ${clientargs} \ -T${tarcmd}${tarargs} $blocksize $newer $tapefile $* $verbose -- cgit From 5ac39c2623791ca868cb95b4060392c59355627d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 1 Sep 1998 06:03:52 +0000 Subject: need to istall new files (This used to be commit c53ead308e941baa4524b9ec62d74290ce91503f) --- source3/script/installswat.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 93f534fd72..6bd11bcb99 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -8,7 +8,7 @@ echo Installing SWAT in $SWATDIR echo Installing the Samba Web Admisistration Tool -for d in $SWATDIR $SWATDIR/help $SWATDIR/images; do +for d in $SWATDIR $SWATDIR/help $SWATDIR/images $SWATDIR/include; do if [ ! -d $d ]; then mkdir $d if [ ! -d $d ]; then @@ -39,6 +39,13 @@ for f in $SRCDIR../swat/help/*.html; do chmod 0644 $FNAME done +for f in $SRCDIR../swat/include/*.html; do + FNAME=$SWATDIR/include/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME +done + cat << EOF ====================================================================== The SWAT files have been installed. Remember to read the swat/README -- cgit From 7bb86c1b132bce31a006ea9768a54db7a45fe1a5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 3 Sep 1998 18:40:31 +0000 Subject: Ok - this is the 64 bit widening check in. It changes the configure to check for stat64 and friends, and then changes much of Samba to use the data type SMB_OFF_T for file size information. stat/fstat/lstat/lseek/ftruncate have now become sys_stat etc. to hide the 64 bit calls if needed. Note that this still does not expose 64 bit functionality to the client, as the changes to the reply_xxx smb's are not yet done. This code change should make these changes possible. Still to do before full 64 bit-ness to the client: fcntl lock code. statfs code widening of dev_t and ino_t (now possible due to SMB_DEV_T and SMB_OFF_T types being in place). Let me know if wierd things happen after this check-in and I'll fix them :-). Jeremy. (This used to be commit 14500936c321d15995c963766aac67bf1f4e3824) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 238bd8e0f6..2e43e88644 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -80,7 +80,7 @@ END { next; } -!/^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE/ { +!/^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T/ { next; } -- cgit From 06cc91f9a631a23dcd4902d710b89e4b7584c459 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 11 Sep 1998 01:24:30 +0000 Subject: Added ssize_t to configure code. Got 'religion' about using size_t and ssize_t for read/write stuff as part of the code to expose 64 bits to the client. This checkin does all the 'easy' stuff - such as all the read/write/lock calls - but now comes the harder parts (open & friends) and all the file enquiry functions..... Jeremy. (This used to be commit 36544fe5476f7770bd5748574fc54be7b3ee4d4a) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 2e43e88644..87c23915b0 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -80,7 +80,7 @@ END { next; } -!/^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T/ { +!/^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t/ { next; } -- cgit From 1e17cbd2a3db061c8638ee8566ded53d14878bca Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 18 Sep 1998 00:12:15 +0000 Subject: nmbd/nmbd_winsserver.c: Fixed printf style warning. script/mkproto.awk: Added SMB_BIG_UINT. Jeremy. (This used to be commit c22c40f0caa7d6a9e8120e6415fa728db708db3e) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 87c23915b0..565f7c1e55 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -80,7 +80,7 @@ END { next; } -!/^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t/ { +!/^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ { next; } -- cgit From e649750cb4d2d2577f0577b1d7a87ae4daf8fb6f Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 21 Sep 1998 09:07:08 +0000 Subject: major autoconf clean-up fix problems in builds with srcdir!=builddir (This used to be commit 1ffc3b807a3f80644c974b454ff5e6f68e89b546) --- source3/script/dummy.in | 1 + source3/script/installcp.sh | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'source3/script') diff --git a/source3/script/dummy.in b/source3/script/dummy.in index e69de29bb2..8b13789179 100644 --- a/source3/script/dummy.in +++ b/source3/script/dummy.in @@ -0,0 +1 @@ + diff --git a/source3/script/installcp.sh b/source3/script/installcp.sh index d1bc7f6291..87b0ef1a8a 100755 --- a/source3/script/installcp.sh +++ b/source3/script/installcp.sh @@ -1,11 +1,13 @@ #!/bin/sh -LIBDIR=$1 -CODEPAGEDIR=$2 -BINDIR=$3 +srcdir=$1 +LIBDIR=$2 +CODEPAGEDIR=$3 +BINDIR=$4 shift shift shift +shift echo Installing codepage files in $CODEPAGEDIR for d in $LIBDIR $CODEPAGEDIR; do @@ -20,7 +22,7 @@ done for p in $*; do echo Creating codepage file $CODEPAGEDIR/codepage.$p - $BINDIR/make_smbcodepage c $p codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p + $BINDIR/make_smbcodepage c $p ${srcdir}/codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p done -- cgit From dc36d8768aa13000c48b520f09f6678ea9ffbf28 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 24 Sep 1998 22:33:13 +0000 Subject: Integration of Anders Blomdell 's smbpasswd changes. Not exactly the same as his code - several changes. Jeremy. (This used to be commit e96747a8e3b9ea5a79c4258e55d7e8f3bf0bf193) --- source3/script/addtosmbpass | 6 +++--- source3/script/mksmbpasswd.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'source3/script') diff --git a/source3/script/addtosmbpass b/source3/script/addtosmbpass index 42af518397..5a41022a27 100644 --- a/source3/script/addtosmbpass +++ b/source3/script/addtosmbpass @@ -48,11 +48,11 @@ BEGIN { } END { fmt = "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:"; - fmt = fmt "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n"; + fmt = fmt "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U]:LCT-00000000:%s:\n"; for(name in names) { while ((getline < pwdf) > 0) { if ($1 == name) { - printf(fmt, $1, $3, $5, $6, $7); + printf(fmt, $1, $3, $5); close(pwdf); notfound = ""; break; @@ -65,7 +65,7 @@ END { command = ypmatch " " name " passwd"; command | getline; if (NF > 0) { - printf(fmt, $1, $3, $5, $6, $7); + printf(fmt, $1, $3, $5); } close(command); } diff --git a/source3/script/mksmbpasswd.sh b/source3/script/mksmbpasswd.sh index 6e592acd65..10acc1257d 100755 --- a/source3/script/mksmbpasswd.sh +++ b/source3/script/mksmbpasswd.sh @@ -2,5 +2,5 @@ awk 'BEGIN {FS=":" printf("#\n# SMB password file.\n#\n") } -{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n", $1, $3, $5, $6, $7) } +{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U]:LCT-00000000:%s\n", $1, $3, $5) } ' -- cgit From 9f2edc69af5d23539c13f07613dd79ad92ebffaf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 24 Sep 1998 22:35:16 +0000 Subject: Updates to the scripts for the new 14-char space format of account attributes. Jeremy. (This used to be commit 32b6f6640d45b083ce35a8c11b1e6f23c19df62c) --- source3/script/addtosmbpass | 2 +- source3/script/mksmbpasswd.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/addtosmbpass b/source3/script/addtosmbpass index 5a41022a27..84a7e6fac0 100644 --- a/source3/script/addtosmbpass +++ b/source3/script/addtosmbpass @@ -48,7 +48,7 @@ BEGIN { } END { fmt = "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:"; - fmt = fmt "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U]:LCT-00000000:%s:\n"; + fmt = fmt "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:LCT-00000000:%s:\n"; for(name in names) { while ((getline < pwdf) > 0) { if ($1 == name) { diff --git a/source3/script/mksmbpasswd.sh b/source3/script/mksmbpasswd.sh index 10acc1257d..854e1bd1b5 100755 --- a/source3/script/mksmbpasswd.sh +++ b/source3/script/mksmbpasswd.sh @@ -2,5 +2,5 @@ awk 'BEGIN {FS=":" printf("#\n# SMB password file.\n#\n") } -{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U]:LCT-00000000:%s\n", $1, $3, $5) } +{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:LCT-00000000:%s\n", $1, $3, $5) } ' -- cgit From 5f7ee360567a6b4e1a6f43ff01da057d2998fef8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 25 Sep 1998 23:40:49 +0000 Subject: Makefile.in: Fixed bug with continuation line causing proto to fail. Added $(PROGS) $(SPROGS) as targets for make clean. acconfig.h: Added HAVE_IRIX_SPECIFIC_CAPABILITIES. configure.in: Added sys/capability.h header check. Added function checks for srandom random srand rand. Added HAVE_IRIX_SPECIFIC_CAPABILITIES test. includes.h: Added #include . ntdomain.h: Moved struct acct_info into here from smb.h smb.h: Added KERNEL_OPLOCK_CAPABILITY define. Moved enum action_type into rpcclient.h Moved struct cli_state into client.h Moved struct nt_client_info, struct tar_client_info, struct client_info into rpcclient.h lib/genrand.c: Changed to use sys_random() & friends. lib/smbrun.c: Lose capabilities after fork. lib/system.c: Added set_process_capability(), set_inherited_process_capability() sys_random(), sys_srandom(). lib/util.c: Added Ander's EFBIG lock check to fcntl_lock for 64 bit access to an 32 bit mounted NFS filesystem. nmbd/nmbd.c: Changed to use sys_random() & friends. nmbd/nmbd_browsesync.c: Changed to use sys_random() & friends. passdb/ldap.c: Missed one pdb_encode_acct_ctrl call. passdb/passdb.c: Changed to Ander's code for ' ' characters. passdb/smbpass.c: Added Ander's code to reset ACB_PWNOTREQ. script/mkproto.awk: Added 'long' to prototypes. smbd/chgpasswd.c: Lose capabilities after fork. smbd/open.c: Do the mmap *after* the kernel oplock. smbd/oplock.c: Removed stub code from kernel oplock path. Added set_process_capability(), set_inherited_process_capability() calls. smbd/reply.c: Initialize count = 0, offset = 0. smbd/server.c: Added set_process_capability(), set_inherited_process_capability() calls. tests/summary.c: Ensure we have RANDOM or RAND. utils/smbpasswd.c: Added Ander's code to reset ACB_PWNOTREQ. utils/torture.c: Changed to use sys_random() & friends. Jeremy. (This used to be commit e8be306f23963ac00b1a383ebe0cc1421529fb02) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 565f7c1e55..88b0490354 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -80,7 +80,7 @@ END { next; } -!/^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ { +!/^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ { next; } -- cgit From cf971f88ac188eec353a7fb021744b8076cc4eb7 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Mon, 28 Sep 1998 00:14:36 +0000 Subject: automated generation of .dummy files for each subdirectory; dummy.in files are no longer needed, and new directories will be taken care of automatically, at configure (or config.status --recheck) time (This used to be commit 237a8e5fe62d757c04b8207cbbee4df1470cfe4e) --- source3/script/dummy.in | 1 - 1 file changed, 1 deletion(-) delete mode 100644 source3/script/dummy.in (limited to 'source3/script') diff --git a/source3/script/dummy.in b/source3/script/dummy.in deleted file mode 100644 index 8b13789179..0000000000 --- a/source3/script/dummy.in +++ /dev/null @@ -1 +0,0 @@ - -- cgit From cf3a9741dc7427efb97eff09a3c197a906ce6767 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 28 Sep 1998 21:43:48 +0000 Subject: Changes to test in configure if capabilities are enabled on a system. Changes to get Samba to compile cleanly with the IRIX compiler with the options : -fullwarn -woff 1209,1174 (the -woff options are to turn off warnings about unused function parameters and controlling loop expressions being constants). Split prototype generation as we hit a limit in IRIX nawk. Removed "." code in smbd/filename.c (yet again :-). Jeremy. (This used to be commit e0567433bd72aec17bf5a54cc292701095d25f09) --- source3/script/mkproto.awk | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 88b0490354..dd8d4946a2 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -80,8 +80,26 @@ END { next; } -!/^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ { - next; +# +# We have to split up the start +# matching as we now have so many start +# types that it can cause some versions +# of nawk/awk to choke and fail on +# the full match. JRA. +# + +{ + gotstart = 0; + if( $0 ~ /^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t/ ) { + gotstart = 1; + } + + if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { + gotstart = 1; + } + if(!gotstart) { + next; + } } -- cgit From a2d7f765e8500f23c126c7b7cb6bb346adc11641 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 29 Sep 1998 04:52:17 +0000 Subject: get away with dummy and .dummy files (This used to be commit 90a8a02484a0897b053fd6531b7fec5d23098b6f) --- source3/script/.cvsignore | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/.cvsignore b/source3/script/.cvsignore index 421376db9e..e69de29bb2 100644 --- a/source3/script/.cvsignore +++ b/source3/script/.cvsignore @@ -1 +0,0 @@ -dummy -- cgit From e2b4941887cc7ab2739c1a6a2482dcc76546b3b0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 4 Oct 1998 03:27:29 +0000 Subject: support a few more function types (like ino_t and off_t) (This used to be commit 758048f1e17db70daa4cd169d5c9b833f94279f4) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index dd8d4946a2..fa4986ba6b 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -90,7 +90,7 @@ END { { gotstart = 0; - if( $0 ~ /^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t/ ) { + if( $0 ~ /^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) { gotstart = 1; } -- cgit From 00ec174d5962e8c1984513f8938f0974de9ba161 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 Nov 1998 02:47:50 +0000 Subject: Very simple awk script to convert a 1.9.18 password file into Samba 2.0 password file format. Jeremy. (This used to be commit 5a5dc248b5fc4f1b9234a15dbedd4e0c9068b15a) --- source3/script/convert_smbpasswd.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 source3/script/convert_smbpasswd.sh (limited to 'source3/script') diff --git a/source3/script/convert_smbpasswd.sh b/source3/script/convert_smbpasswd.sh new file mode 100755 index 0000000000..edb775d3a6 --- /dev/null +++ b/source3/script/convert_smbpasswd.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Convert a Samba 1.9.18 smbpasswd file format into +# a Samba 2.0 smbpasswd file format. +# Read from stdin and write to stdout for simplicity. +# Set the last change time to 0x363F96AD to avoid problems +# with trying to work out how to get the seconds since 1970 +# in awk or the shell. JRA. +# +nawk 'BEGIN {FS=":"} +{ + if( $0 ~ "^#" ) { + print $0 + } else { + printf( "%s:%s:%s:%s:[U ]:LCT-363F96AD:\n", $1, $2, $3, $4); + } +}' -- cgit From 0890fe0b70f0a0106da74745dec4b8a0fb38de04 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 Nov 1998 02:50:17 +0000 Subject: Realise this needs to be without the '.sh' ending as we will be installing it in the BIN directory. Jeremy. (This used to be commit 75c79db9bec68b74d3b244f3d8184bd890ff33fa) --- source3/script/convert_smbpasswd | 17 +++++++++++++++++ source3/script/convert_smbpasswd.sh | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) create mode 100755 source3/script/convert_smbpasswd delete mode 100755 source3/script/convert_smbpasswd.sh (limited to 'source3/script') diff --git a/source3/script/convert_smbpasswd b/source3/script/convert_smbpasswd new file mode 100755 index 0000000000..edb775d3a6 --- /dev/null +++ b/source3/script/convert_smbpasswd @@ -0,0 +1,17 @@ +#!/bin/sh +# +# Convert a Samba 1.9.18 smbpasswd file format into +# a Samba 2.0 smbpasswd file format. +# Read from stdin and write to stdout for simplicity. +# Set the last change time to 0x363F96AD to avoid problems +# with trying to work out how to get the seconds since 1970 +# in awk or the shell. JRA. +# +nawk 'BEGIN {FS=":"} +{ + if( $0 ~ "^#" ) { + print $0 + } else { + printf( "%s:%s:%s:%s:[U ]:LCT-363F96AD:\n", $1, $2, $3, $4); + } +}' diff --git a/source3/script/convert_smbpasswd.sh b/source3/script/convert_smbpasswd.sh deleted file mode 100755 index edb775d3a6..0000000000 --- a/source3/script/convert_smbpasswd.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# Convert a Samba 1.9.18 smbpasswd file format into -# a Samba 2.0 smbpasswd file format. -# Read from stdin and write to stdout for simplicity. -# Set the last change time to 0x363F96AD to avoid problems -# with trying to work out how to get the seconds since 1970 -# in awk or the shell. JRA. -# -nawk 'BEGIN {FS=":"} -{ - if( $0 ~ "^#" ) { - print $0 - } else { - printf( "%s:%s:%s:%s:[U ]:LCT-363F96AD:\n", $1, $2, $3, $4); - } -}' -- cgit From ff63eca1b14f5aa95ee200fe58f88a745666b652 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 5 Nov 1998 22:08:47 +0000 Subject: Useful script to extract all parameters out of the loadparm.c file and sort them into global (G) and service (S) parameters. Useful for keeping the smb.conf docs up to date. Jeremy. (This used to be commit e8c5e033083440818cb559c61bcf5f9baec511ea) --- source3/script/extract_allparms.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100755 source3/script/extract_allparms.sh (limited to 'source3/script') diff --git a/source3/script/extract_allparms.sh b/source3/script/extract_allparms.sh new file mode 100755 index 0000000000..f16068b3fd --- /dev/null +++ b/source3/script/extract_allparms.sh @@ -0,0 +1,2 @@ +#!/bin/sh +grep '{".*P_[GL]' param/loadparm.c | sed -e 's/&.*$//g' -e 's/",.*P_LOCAL.*$/ S/' -e 's/",.*P_GLOBAL.*$/ G/' -e 's/^ .*{"//g' | sort -f -- cgit From d90f25d38098de5e41e745e801a8dcbab727c285 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 11 Nov 1998 00:40:24 +0000 Subject: Added manpages/ to source path. Jeremy. (This used to be commit 0f7977ef74af1cbb7e92df8cb1b5545247056b52) --- source3/script/installman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 12a63e26c0..ba78b56806 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -18,7 +18,7 @@ done for sect in 1 5 7 8 ; do for m in $MANDIR/man$sect ; do - for s in $SRCDIR../docs/*$sect; do + for s in $SRCDIR../docs/manpages/*$sect; do FNAME=$m/`basename $s` echo Installing $FNAME cp $s $m || echo Cannot create $FNAME... does $USER have privileges? -- cgit From 26552543ff2960ab9c483240a27adfe15cf9c813 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 11 Nov 1998 01:16:48 +0000 Subject: Adding YODL docs maintainer script. Jeremy. (This used to be commit f04c2b4deeaee7360b5757de8eb7cb019d886e46) --- source3/script/makeyodldocs.sh | 75 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100755 source3/script/makeyodldocs.sh (limited to 'source3/script') diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh new file mode 100755 index 0000000000..ded7d69a6d --- /dev/null +++ b/source3/script/makeyodldocs.sh @@ -0,0 +1,75 @@ +#!/bin/sh +SRCDIR=$1/ + +YODLDIR=$SRCDIR/../docs/yodldocs +MANPAGEDIR=$SRCDIR/../docs/manpages +HTMLDIR=$SRCDIR/../docs/htmldocs + +echo "Re-creating man pages and HTML pages from YODL sources..." + +if [ ! -d $MANPAGEDIR ]; then + echo "directory $MANPAGEDIR does not exist, are we in the right place?" + exit 1 +fi + +if [ ! -d $HTMLDIR ]; then + echo "directory $HTMLDIR does not exist, are we in the right place?" + exit 1 +fi + +if [ ! -d $YODLDIR ]; then + echo "directory $YODLDIR does not exist, are we in the right place?" + exit 1 +fi + +cd $YODLDIR + +for d in *.yo +do + +# +# Create the basename from the YODL manpage +# + bn=`echo $d | sed -e 's/\.yo//` + + case "$d" + in + *.[0-9].yo) + echo "Creating man pages..." + echo $d + rm -f $bn.man + yodl2man $d + if [ ! -f $bn.man ]; then + echo "Failed to make man page for $d" + exit 1 + fi + cp $bn.man ../manpages/$bn || echo "Cannot create $YODLDIR/../manpages/$bn" + + echo "Creating html versions of man pages..." + echo $d + rm -f $bn.html + yodl2html $d + if [ ! -f $bn.html ]; then + echo "Failed to make html page for $d" + exit 1 + fi + cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" + ;; + *) +# +# Non man-page YODL docs - just make html. +# + echo $d + rm -f $bn.html + yodl2html $d + if [ ! -f $bn.html ]; then + echo "Failed to make html page for $d" + exit 1 + fi + cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" + ;; + esac +done + +echo "Remember to CVS check in your changes..." +exit 0 -- cgit From b94520e424bc6e348dcb380ff8285583bbb18a34 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 11 Nov 1998 01:33:57 +0000 Subject: Makefile.in: Added target for makeyodldocs - not used by default. rpc_client/cli_reg.c: The perils of cut-n-paste coding include using variables before they are initialised :-). script/makeyodldocs.sh: Remove the intermediate files. Jeremy. (This used to be commit 88031bca5c528157ef2fe1d976a245b186ff8959) --- source3/script/makeyodldocs.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/script') diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh index ded7d69a6d..def0af345f 100755 --- a/source3/script/makeyodldocs.sh +++ b/source3/script/makeyodldocs.sh @@ -44,6 +44,7 @@ do exit 1 fi cp $bn.man ../manpages/$bn || echo "Cannot create $YODLDIR/../manpages/$bn" + rm -f $bn.man echo "Creating html versions of man pages..." echo $d @@ -54,6 +55,7 @@ do exit 1 fi cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" + rm -f $bn.html ;; *) # @@ -67,6 +69,7 @@ do exit 1 fi cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" + rm -f $bn.html ;; esac done -- cgit From 51acfa91c1b33396f0ed729a7bce931a69057eed Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 11 Nov 1998 02:10:20 +0000 Subject: Added code to copy smb.conf.5.html to the swat help directory. Jeremy. (This used to be commit 3b2a32293b9da7bc6acd4dea3e54d98270495853) --- source3/script/makeyodldocs.sh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3/script') diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh index def0af345f..51151ec353 100755 --- a/source3/script/makeyodldocs.sh +++ b/source3/script/makeyodldocs.sh @@ -55,6 +55,14 @@ do exit 1 fi cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" +# +# Copy to SWAT directory. +# + if [ $bn = "smb.conf.5" ]; then + rm -f ../../swat/help/smb.conf.5.html || echo "Cannot remove ../../swat/help/smb.conf.5.html" + + cp $bn.html ../../swat/help || echo "Cannot copy smb.conf.5.html to ../../swat/help/smb.conf.5.html" + fi rm -f $bn.html ;; *) -- cgit From 0e09fba835d0d65e2a927befaf3713dd481d8939 Mon Sep 17 00:00:00 2001 From: Jean-François Micouleau Date: Wed, 11 Nov 1998 11:30:30 +0000 Subject: makeyodldocs.sh now works with the bash shell (This used to be commit a41defc36756eef0054f66dcbd46890453ad5ae3) --- source3/script/makeyodldocs.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/script') diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh index 51151ec353..16a905c6e1 100755 --- a/source3/script/makeyodldocs.sh +++ b/source3/script/makeyodldocs.sh @@ -1,5 +1,5 @@ -#!/bin/sh -SRCDIR=$1/ +#!/bin/sh -v +SRCDIR=$1 YODLDIR=$SRCDIR/../docs/yodldocs MANPAGEDIR=$SRCDIR/../docs/manpages @@ -30,7 +30,7 @@ do # # Create the basename from the YODL manpage # - bn=`echo $d | sed -e 's/\.yo//` + bn=`echo $d | sed -e 's/\.yo//'` case "$d" in -- cgit From f49b994aeb987ac87c3c49f35ae1e05a7004f75d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 11 Nov 1998 23:25:51 +0000 Subject: rpc_server/srv_netlog.c: Fixed crash bug with ACB_PWNOTREQ. script/makeyodldocs.sh: Added code to make text docs for non-man page YODL docs. web/cgi.c web/swat.c: SGI compiler warnings fixed. Jeremy. (This used to be commit 80e0f7e1071f032c5004aecb01a91d1397e6a161) --- source3/script/makeyodldocs.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh index 16a905c6e1..c943224fe5 100755 --- a/source3/script/makeyodldocs.sh +++ b/source3/script/makeyodldocs.sh @@ -67,7 +67,7 @@ do ;; *) # -# Non man-page YODL docs - just make html. +# Non man-page YODL docs - just make html and text. # echo $d rm -f $bn.html @@ -78,6 +78,14 @@ do fi cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" rm -f $bn.html + rm -f $bn.txt + yodl2txt $d + if [ ! -f $bn.txt ]; then + echo "Failed to make text page for $d" + exit 1 + fi + cp $bn.txt ../textdocs || echo "Cannot create $YODLDIR/../textdocs/$bn.txt" + rm -f $bn.txt ;; esac done -- cgit From dfac41840a546801c759d385895a03e223aa5bc7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 12 Nov 1998 23:57:18 +0000 Subject: we don't have any jpeg images any more (This used to be commit ae5f174ef163734c61c0d30b32f5564cfba02666) --- source3/script/installswat.sh | 7 ------- 1 file changed, 7 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 6bd11bcb99..c2a1f423ad 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -25,13 +25,6 @@ for f in $SRCDIR../swat/images/*.gif; do chmod 0644 $FNAME done -for f in $SRCDIR../swat/images/*.jpg; do - FNAME=$SWATDIR/images/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME -done - for f in $SRCDIR../swat/help/*.html; do FNAME=$SWATDIR/help/`basename $f` echo $FNAME -- cgit From 3a31d509a883e321784154ed6c4e0b6bc21673c4 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Fri, 13 Nov 1998 20:19:06 +0000 Subject: LOCAL_GRP and DOMAIN_GRP are return types (This used to be commit 887063e421d476fe2c2f6809750af3bfb020a85c) --- source3/script/mkproto.awk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index fa4986ba6b..d1cbf5b667 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -94,6 +94,10 @@ END { gotstart = 1; } + if( $0 ~ /^LOCAL_GRP|^DOMAIN_GRP/ ) { + gotstart = 1; + } + if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { gotstart = 1; } -- cgit From 8fc1504ff8204dd1ca735f31c769f6dadf0f88cb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 13 Nov 1998 21:41:01 +0000 Subject: Makefile.in configure configure.in include/config.h.in: Changes for DGUX and UNIXWARE. groupdb/aliasdb.c groupdb/aliasfile.c groupdb/groupfile.c: Don't use snprinf, use slprintf. include/includes.h: Fix YP problem. include/smb.h: Fix ZERO_STRUCTP. lib/util_sock.c: Added strerror() in debugs. passdb/ldap.c: Don't use snprinf, use slprintf. rpc_client/cli_lsarpc.c rpc_client/cli_pipe.c rpc_parse/parse_sec.c rpc_server/srv_pipe.c: Don't use snprinf, use slprintf. script/installman.sh: DGUX changes. smbd/open.c smbd/oplock.c: Fixed gcc warnings. web/swat.c: Changes USER to SWAT_USER. (This used to be commit 4c2b5a00983501e5d4aad1456ba8b5ab0dfd9b4c) --- source3/script/installman.sh | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index ba78b56806..12e49fcda3 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -3,6 +3,9 @@ MANDIR=$1 SRCDIR=$2/ +if [ $# -ge 3 ] ; then + GROFF=$3 # sh cmd line, including options +fi echo Installing man pages in $MANDIR @@ -20,9 +23,24 @@ for sect in 1 5 7 8 ; do for m in $MANDIR/man$sect ; do for s in $SRCDIR../docs/manpages/*$sect; do FNAME=$m/`basename $s` - echo Installing $FNAME - cp $s $m || echo Cannot create $FNAME... does $USER have privileges? - chmod 0644 $FNAME + + # Test for writability. Involves + # blowing away existing files. + + if (rm -f $FNAME && touch $FNAME); then + rm $FNAME + if [ ! "$GROFF" ] ; then + cp $s $m # Copy raw nroff + else + echo "\t$FNAME" # groff'ing can be slow, give the user + # a warm fuzzy. + $GROFF $s > $FNAME # Process nroff, because man(1) (on + # this system) doesn't . + fi + chmod 0644 $FNAME + else + echo Cannot create $FNAME... does $USER have privileges? + fi done done done -- cgit From 3b4a9ff3809ee05a7f06c3eaddd1e5a6e35bfc49 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 16 Nov 1998 23:28:59 +0000 Subject: Makefile.in: Re-added quotes round ROFF call for DGUX. script/installman.sh: Make installman ignore ROFF argument if it is "". smbd/oplock.c: Move location of oplock test file to lockdir. Jeremy. (This used to be commit 6c25a3314243997508b0b2da4bfa10bb979e9c10) --- source3/script/installman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 12e49fcda3..b3422e5b3d 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -29,7 +29,7 @@ for sect in 1 5 7 8 ; do if (rm -f $FNAME && touch $FNAME); then rm $FNAME - if [ ! "$GROFF" ] ; then + if [ x$GROFF = x ] ; then cp $s $m # Copy raw nroff else echo "\t$FNAME" # groff'ing can be slow, give the user -- cgit From 768761820e8d7481c586c4e0ab4ac7cb36d18c4b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 17 Nov 1998 20:50:07 +0000 Subject: Added the same open()/fopen()/creat()/mmap() -> sys_XXX calls. Tidied up some of the mess (no other word for it). Still doesn't compile cleanly. There are calls with incorrect parameters that don't seem to be doing the right thing. This code still needs surgery :-(. Jeremy. (This used to be commit 18ff93a9abbf68ee8c59c0af3e57c63e4a015dac) --- source3/script/installman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index b3422e5b3d..4eda8fd537 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -29,7 +29,7 @@ for sect in 1 5 7 8 ; do if (rm -f $FNAME && touch $FNAME); then rm $FNAME - if [ x$GROFF = x ] ; then + if [ "x$GROFF" = x ] ; then cp $s $m # Copy raw nroff else echo "\t$FNAME" # groff'ing can be slow, give the user -- cgit From 634f6c7f2841a3ee88163ff7e92b0ef3c9d7ecf0 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Sat, 21 Nov 1998 09:29:35 +0000 Subject: Added changes to smbtar submitted by Sandy Whitesel Added some extra documentation for smbclient Grr, Jeremy beat me to a bug fix in client.c Will have to get Jeremy to tell me how to check out SAMBA_2_0 :-) (This used to be commit 8594c4bcae503972679c55a2fcab8eb69faf3ae3) --- source3/script/smbtar | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/smbtar b/source3/script/smbtar index 25c36b2a8f..203d24cf63 100644 --- a/source3/script/smbtar +++ b/source3/script/smbtar @@ -7,6 +7,8 @@ # # (May need to change shell to ksh for HPUX or OSF for better getopts) # +# sandy nov 3 '98 added -a flag +# # Richard Sharpe, added -c 'tarmode full' so that we back up all files to # fix a bug in clitar when a patch was added to stop system and hidden files # being backed up. @@ -43,6 +45,7 @@ Function: backup/restore a Windows PC directories to a local tape file Options: (Description) (Default) -r Restore from tape file to PC Save from PC to tapefile -i Incremental mode Full backup mode + -a Reset archive bit mode Don't reset archive bit -v Verbose mode: echo command Don't echo anything -s Specify PC Server $server -p Specify PC Password $password @@ -69,7 +72,7 @@ if [ $# = 0 ]; then fi -while getopts rivl:b:d:N:s:p:x:u:Xt: c; do +while getopts riavl:b:d:N:s:p:x:u:Xt: c; do case $c in r) # [r]estore to Windows (instead of the default "Save from Windows") tarcmd="x" @@ -77,6 +80,9 @@ while getopts rivl:b:d:N:s:p:x:u:Xt: c; do i) # [i]ncremental tarargs=${tarargs}g ;; + a) # [a]rchive + tarargs=${tarargs}a + ;; l) # specify [l]og file log="-d $OPTARG" case "$OPTARG" in -- cgit From 4cee58780cb15fe5889b9dd0dc34459512d75062 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Mon, 23 Nov 1998 21:51:05 +0000 Subject: unix instance of group database API (This used to be commit e76f593b3572ac881f1aa1fb3326d8b7169b0078) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index d1cbf5b667..e54984e4e5 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -90,7 +90,7 @@ END { { gotstart = 0; - if( $0 ~ /^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) { + if( $0 ~ /^connection_struct|^LOCAL_GRP|^DOMAIN_GRP|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) { gotstart = 1; } -- cgit From 05045be470969317f51827cd9823eb9e7801cb53 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 27 Nov 1998 06:09:03 +0000 Subject: install all html docs in yodl help directory (This used to be commit ed4d1062b2655d59f6904344e708aa53af235ad5) --- source3/script/installswat.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index c2a1f423ad..cc2ab943d9 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -32,6 +32,13 @@ for f in $SRCDIR../swat/help/*.html; do chmod 0644 $FNAME done +for f in $SRCDIR../docs/htmldocs/*.html; do + FNAME=$SWATDIR/help/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME +done + for f in $SRCDIR../swat/include/*.html; do FNAME=$SWATDIR/include/`basename $f` echo $FNAME -- cgit From 9ebe82cd5c74211fa668c4b3163b697895d7f4db Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 27 Nov 1998 21:32:08 +0000 Subject: Now uninstalls man pages from correct source location. Fix by Andrej Borsenkow (This used to be commit 5c0e31982e8eb1c93bc77925e59be65798f2dbad) --- source3/script/uninstallman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/uninstallman.sh b/source3/script/uninstallman.sh index b6d2524ec7..873ca4f720 100755 --- a/source3/script/uninstallman.sh +++ b/source3/script/uninstallman.sh @@ -8,7 +8,7 @@ echo Uninstalling man pages from $MANDIR for sect in 1 5 7 8 ; do for m in $MANDIR/man$sect ; do - for s in $SRCDIR/../docs/*$sect; do + for s in $SRCDIR/../docs/manpages/*$sect; do FNAME=$m/`basename $s` if test -f $FNAME; then echo Deleting $FNAME -- cgit From dc003d8d408b87eecba9044d2d8732a3604827bf Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel" Date: Wed, 16 Dec 1998 18:50:54 +0000 Subject: A while back, Andrew and I talked about making the debug parsing code a better "fit" with other Samba code. This is a small first step toward doing what (I think) we agreed to do. I've moved the key function from ubiqx/debugparse.c into lib/debug.c. I have also moved the enum from ubiqx/debugparse.h into the debug section in smb.h. The next thing to do is to get debug2html added into the Makefile.in so that it is always produced when compiling the suite. Chris -)----- (This used to be commit 782474f41e0c2bc0b1f098758a3e5cb44e87d8b1) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index e54984e4e5..3309e89a0f 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -98,7 +98,7 @@ END { gotstart = 1; } - if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { + if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT|dbg_Token/ ) { gotstart = 1; } if(!gotstart) { -- cgit From 1e71ecdcb21f24e70ee5edbbc05de0284fa588f4 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Tue, 23 Feb 1999 22:39:54 +0000 Subject: added jeremy's new c++-like code for parsing of security descriptors. (This used to be commit ec1b7000fd88c5a08e438c7033f60e49b9ec44a8) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 3309e89a0f..fab3529243 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -94,7 +94,7 @@ END { gotstart = 1; } - if( $0 ~ /^LOCAL_GRP|^DOMAIN_GRP/ ) { + if( $0 ~ /^LOCAL_GRP|^DOMAIN_GRP|^DOM_SID|^SEC_DESC/ ) { gotstart = 1; } -- cgit From 236cea4efa18094c3445bee310195ac12b6073ee Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Mon, 1 Mar 1999 16:31:14 +0000 Subject: Benjamin Kuit's MYSQL SAM Database implementation. Copyright (C) Benjamin Kuit 1999. (This used to be commit fdf61e1dabc2c977ee5cf1e9d60e3380f19840da) --- source3/script/mysql_convert.pl | 364 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 364 insertions(+) create mode 100644 source3/script/mysql_convert.pl (limited to 'source3/script') diff --git a/source3/script/mysql_convert.pl b/source3/script/mysql_convert.pl new file mode 100644 index 0000000000..e9c1b9de56 --- /dev/null +++ b/source3/script/mysql_convert.pl @@ -0,0 +1,364 @@ +#!/usr/local/bin/perl + +use Mysql; + +$ACB_DISABLED=0x0001; +$ACB_HOMDIRREQ=0x0002; +$ACB_PWNOTREQ=0x0004; +$ACB_TEMPDUP=0x0008; +$ACB_NORMAL=0x0010; +$ACB_MNS=0x0020; +$ACB_DOMTRUST=0x0040; +$ACB_WSTRUST=0x0080; +$ACB_SVRTRUST=0x0100; +$ACB_PWNOEXP=0x0200; +$ACB_AUTOLOCK=0x0400; + +sub getoptionval { + my ($option) = @_; + + my ($value) = ($option =~ /^[^=]+=\s*(\S.*\S)/ ); + + return $value; +} + +sub usage { + +print < # smbpasswd style file to read entries from + --outfile= # file to dump results to, format depending + # on --infile: + # With --infile: Dump mysql script queries + # Without --infile: Dump smbpasswd format + # from reading mysql database + --host= # Mysql Server name (default: localhost) + --db= # Mysql Database name + --user= # Mysql User + --password[=] # Mysql password for --user + --table= # Mysql table + --create # Generate 'create table' query + --file=[trash|append] # Action to take if --outfile file exists + --check # Do not alter or skip bad uids + +EOUSAGE +exit 0; +} + +sub getpass { + my($prompt)=@_; + my($ret); + + print $prompt; + system "stty -echo"; + chomp($ret=); + system "stty echo"; + print "\n"; + $ret; +} + +sub next_entry { + my ($name,$uid,$lm,$nt,$f,$lct) = (); + + $name=""; + if ( not $infile ) { + ($name,$uid,$lm,$nt,$f,$lct) = $mysqlquery->fetchrow(); + } + else { + my $line=; + + return () if ( not $line ); + + chomp($line); + + next if ( $line !~ /^[^: ]+:\d+:/ ); + + ($name,$uid,$lm,$nt,$f,$lct) = split(/:/,$line); + + if ( $lct =~ /^LCT-/ ) { + # New Format smbpasswd file + my $flags=0; + + $flags |= $ACB_PWNOTREQ if ( $f =~ /N/ ); + $flags |= $ACB_DISABLED if ( $f =~ /D/ ); + $flags |= $ACB_HOMDIRREQ if ( $f =~ /H/ ); + $flags |= $ACB_TEMPDUP if ( $f =~ /T/ ); + $flags |= $ACB_NORMAL if ( $f =~ /U/ ); + $flags |= $ACB_MNS if ( $f =~ /M/ ); + $flags |= $ACB_WSTRUST if ( $f =~ /W/ ); + $flags |= $ACB_SVRTRUST if ( $f =~ /S/ ); + $flags |= $ACB_AUTOLOCK if ( $f =~ /L/ ); + $flags |= $ACB_PWNOEXP if ( $f =~ /X/ ); + $flags |= $ACB_DOMTRUST if ( $f =~ /I/ ); + + $f = $flags; + + $f = $ACB_NORMAL if ( not $f ); + + $lct =~ s/LCT-//; + $lct = (unpack("L",pack("H8",$lct)))[0]; + } + else { + # Old Format smbpasswd file + $f = 0; + $lct = time(); + if ( $lm =~ /^NO PASS/ ) { + $f |= $ACB_PWNOTREQ; + $lm = ""; + $nt = ""; + } + elsif ( $lm =~ /^XX/ ) { + $f |= $ACB_DISABLED; + + $lm = ""; + $nt = ""; + } + + if ( $name =~ /\$$/ ) { + $f |= $ACB_WSTRUST; + } + + $f = $ACB_NORMAL if ( not $f ); + } + } + return () if ( not $name ); + ($name,$uid,$lm,$nt,$f,$lct); +} + +sub do_query { + my ( $query ) = @_; + + chomp($query); + if ( $outfile ) { + print OUTFILE "$query;\n"; + } + else { + if ( not $mysqldb->query($query) ) { + print "$query: $Mysql::db_errstr\n"; + } + } +} + +sub do_file { + my ($file,$name,$uid,$lm,$nt,$f,$lct)=@_; + + my $strings = ""; + + $strings .= "N" if ( $f & $ACB_PWNOTREQ ); + $strings .= "D" if ( $f & $ACB_DISABLED ); + $strings .= "H" if ( $f & $ACB_HOMDIRREQ ); + $strings .= "T" if ( $f & $ACB_TEMPDUP ); + $strings .= "U" if ( $f & $ACB_NORMAL ); + $strings .= "M" if ( $f & $ACB_MNS ); + $strings .= "W" if ( $f & $ACB_WSTRUST ); + $strings .= "S" if ( $f & $ACB_SVRTRUST ); + $strings .= "L" if ( $f & $ACB_AUTOLOCK ); + $strings .= "X" if ( $f & $ACB_PWNOEXP ); + $strings .= "I" if ( $f & $ACB_DOMTRUST ); + + $f = sprintf( "[%-11s]", $strings ); + + $lct=uc("LCT-".(unpack("H8",pack("L","$lct")))[0]); + + $lm = "X"x32 if ( not $lm ); + $nt = "X"x32 if ( not $nt ); + + print $file "$name:$uid:$lm:$nt:$f:$lct\n"; +} + +$dbhost = "localhost"; + +for $option ( @ARGV ) { + if ( $option =~ /--outfile=/ ) { + $outfile = getoptionval($option); + } + elsif ( $option =~ /--infile=/ ) { + $infile = getoptionval($option); + } + elsif ( $option =~ /--db=/ ) { + $dbname = getoptionval($option); + } + elsif ( $option =~ /--user=/ ) { + $dbuser = getoptionval($option); + } + elsif ( $option =~ /--host=/ ) { + $dbhost = getoptionval($option); + } + elsif ( $option =~ /--password/ ) { + $dbpasswd = getoptionval($option); + $need_password = "yes" + } + elsif ( $option =~ /--table=/ ) { + $dbtable = getoptionval($option); + } + elsif ( $option =~ /--create/ ) { + $create_table = "yes"; + } + elsif ( $option =~ /--file=/ ) { + $file_action = getoptionval($option); + } + elsif ( $option =~ /--check/ ) { + $check = "yes"; + } + else { + print "Unknown option: $option\n"; + $unknown = "yes"; + } +} + +&usage if ( $unknown eq "yes" ); + +if ( ( not $infile ) && ( not $outfile ) && ( $create_table ne "yes" ) ) { + print "Need file to read from or write to\n"; + &usage; +} +elsif ( $infile && $outfile ) { + if ( not $dbtable ) { + print "Need --table to create queries\n"; + exit 1; + } + + # Reading a smbpasswd file, dumping queries into an file which + # can be used for a mysql script + # --db* options are ignored. + + $ignored = ""; + $ignored .= " --db" if ( $dbname ); + $ignored .= " --user" if ( $dbuser ); + $ignored .= " --password" if ( $dbuser ); + + if ( $ignored ) { + print "Ignoring options: $ignored\n"; + } +} +elsif ( (not $dbname) || (not $dbtable) || (not $dbuser) ) { + print "Missing database particulars:\n"; + print " --db=??\n" if ( not $dbname ); + print " --user=??\n" if ( not $dbuser ); + print " --table=??\n" if ( not $dbtable ); + &usage; +} +else { + if ( ($need_password eq "yes") && ( not $dbpasswd )) { + $dbpasswd = getpass("Enter MySQL password for $dbuser: "); + } + $mysqldb = Connect Mysql($dbhost,$dbname,$dbuser,$dbpasswd); + + if ( not $mysqldb ) { + print "Cannot connect to database: $Mysql::db_errstr\n"; + exit 1; + } + + if ( $outfile ) { + $mysqlquery = $mysqldb->query("select unix_name,unix_uid,smb_passwd,smb_nt_passwd,acct_ctrl,pass_last_set_time from $dbtable"); + + if ( not $mysqlquery ) { + print "MySQL Query failed: $Mysql::db_errstr\n"; + exit 1; + } + } +} + +if ( $create_table eq "yes" ) { + $create_table_query=< Date: Wed, 3 Mar 1999 20:48:48 +0000 Subject: Benjamin Kuit's latest mysql mods. issue with "make proto" needs to be resolved. (This used to be commit d59a2e669aed7ee33fdca8b8ec126b1c0a984981) --- source3/script/mysql_convert.pl | 77 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 73 insertions(+), 4 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mysql_convert.pl b/source3/script/mysql_convert.pl index e9c1b9de56..1479ce62b7 100644 --- a/source3/script/mysql_convert.pl +++ b/source3/script/mysql_convert.pl @@ -1,6 +1,73 @@ -#!/usr/local/bin/perl - -use Mysql; +#!/bin/env perl +# +# MYSQL Convert - Creates and initialises mysql tables for use by samba +# +# Copyright (C) Benjamin Kuit 1999, +# Copyright (C) Andrew Tridgell 1992-1999, +# Copyright (C) Luke Kenneth Casson Leighton 1996-1998, +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# +# +# Converts smbpasswd files into MySQL tables. +# Can understand Samba 1.19 and Samba 2.0 file formats. +# Assumes table structure: +# unix_name char(20) not null, +# unix_uid int(10) unsigned not null, +# nt_name char(20) not null, +# user_rid int(10) unsigned not null, +# smb_passwd char(32), +# smb_nt_passwd char(32), +# acct_ctrl int(10) unsigned not null, +# pass_last_set_time int(10) unsigned not null, +# unique (unix_name), +# unique (unix_uid) +# When given the --create option, mysql_convert will generate this +# statement. +# +# To move from flat file smbpasswd directly into a mysql table: +# +# mysql_convert.pl --db=samba --table=smbpasswd --user=samba --create --infile=smbpasswd +# +# Assumes mysql server on localhost, use --host if otherwise. +# To convert back to flat file: +# +# mysql_convert.pl --db=samba --table=smbpasswd --user=samba --outfile=smbpasswd +# +# If smbpasswd file already exists, use --file=append or --file=trash +# to determine whether to append or over-right the file. +# +# In converting from NT Server PDC to Samba PDC: +# Run pwdump on NT Server to generate an smbpasswd file (Samba 1.19 format), +# called say NTpasslist. +# then: +# +# mysql_convert.pl --db=samba --table=smbpasswd --user=samba --infile=NTpasslist --create --check +# +# The --check option will change the unix_uid field to the real uid +# value of respective users, also filter out users that dont exist on +# the system. +# +# If dont have mysql perl module: +# +# mysql_convert.pl --table=smbpasswd --infile=NTpasslist --outfile=mysql.txt +# +# Then use the mysql client: +# +# mysql -u samba < mysql.txt +# $ACB_DISABLED=0x0001; $ACB_HOMDIRREQ=0x0002; @@ -17,7 +84,7 @@ $ACB_AUTOLOCK=0x0400; sub getoptionval { my ($option) = @_; - my ($value) = ($option =~ /^[^=]+=\s*(\S.*\S)/ ); + my ($value) = ($option =~ /^[^=]+=\s*(\S.*\S)\s*$/ ); return $value; } @@ -240,6 +307,8 @@ elsif ( (not $dbname) || (not $dbtable) || (not $dbuser) ) { &usage; } else { + use Mysql; + if ( ($need_password eq "yes") && ( not $dbpasswd )) { $dbpasswd = getpass("Enter MySQL password for $dbuser: "); } -- cgit From 042213eb2277518a918f0687fdb2968196585638 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 10 Jun 1999 10:16:26 +0000 Subject: Use ${1+"$@"} instead of $* Reported by SATOH Fumiyasu (This used to be commit 6cd8d68965734ac24effde927c689f7d5202cde1) --- source3/script/smbtar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/smbtar b/source3/script/smbtar index 203d24cf63..f04eddc32b 100644 --- a/source3/script/smbtar +++ b/source3/script/smbtar @@ -157,5 +157,5 @@ fi eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \ -E -N $log -D "'$cdcmd'" ${clientargs} \ --T${tarcmd}${tarargs} $blocksize $newer $tapefile $* $verbose +-T${tarcmd}${tarargs} $blocksize $newer $tapefile '${1+"$@"}' $verbose -- cgit From cae193606d6f625010d39d528b8523d3652e485a Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 13 Jun 1999 04:15:30 +0000 Subject: Modified to cope with functions that return a const something. (This used to be commit 56738ec5263edba23d8337dde27e7da45ec06490) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index fab3529243..c35883aec0 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -98,7 +98,7 @@ END { gotstart = 1; } - if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT|dbg_Token/ ) { + if( $0 ~ /^const|^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT|dbg_Token/ ) { gotstart = 1; } if(!gotstart) { -- cgit From c015b02b43fa0d7743eb555fdf50fc433dc67b98 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Wed, 3 Nov 1999 19:58:47 +0000 Subject: three types of array-creation / array-deletion functions: char* UNISTR2* SID* decided to create a higher-order function set, add_item_to_array() free_item_array(). higher-order support routines needed to add a new type: type* item_dup(const type*) void item_free(type*) of course, strdup() and free() are perfect, pre-existing examples of such functions, used in the implementation of add_chars_to_array() and free_char_array(). sid_dup() and free() work for the add_sids_to_array() and free_sid_array() implementations. use unistr2_dup() and created unistr2_free() because the functionality behind these may change into something horrible, like [horror] dynamic memory allocation of the UNISTR2 character array. argh!!!! jean-francois, this function set implements what we talked about over... a year ago, now :-) (This used to be commit a80ea2eb47d298095eb6e5b0455309daa3a631cb) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index c35883aec0..bc6f50af99 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -94,7 +94,7 @@ END { gotstart = 1; } - if( $0 ~ /^LOCAL_GRP|^DOMAIN_GRP|^DOM_SID|^SEC_DESC/ ) { + if( $0 ~ /^UNISTR2|^LOCAL_GRP|^DOMAIN_GRP|^DOM_SID|^SEC_DESC/ ) { gotstart = 1; } -- cgit From 0f18ca772da544a93799ca130a8f23529aad98f6 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Sat, 6 Nov 1999 19:52:04 +0000 Subject: added rpcclient spoolenum command. enumerates printers. spoolss_r_io_enumprinters doesn't decode strings correctly as printer_info_1/2 code has only been written to write structures, not read them. (This used to be commit 135eaa977385cdd5f572a51f654f14d893347d7b) --- source3/script/mkproto.awk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index bc6f50af99..9e4c7de2d6 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -94,6 +94,10 @@ END { gotstart = 1; } + if( $0 ~ /^PRINTER_INFO_1|^PRINTER_INFO_2/ ) { + gotstart = 1; + } + if( $0 ~ /^UNISTR2|^LOCAL_GRP|^DOMAIN_GRP|^DOM_SID|^SEC_DESC/ ) { gotstart = 1; } -- cgit From 702b085293af8ffe7a04865db78a36c85beb22ee Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Mon, 8 Nov 1999 22:00:41 +0000 Subject: preparation for doing a spoolss enum jobs command. had to rewrite spoolss_enumjobs parsing code to do read / writes not just writes. (This used to be commit bc659a09f9103eee9616279e27fafacf89dcd9b9) --- source3/script/mkproto.awk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 9e4c7de2d6..b286e1f7db 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -94,6 +94,10 @@ END { gotstart = 1; } + if( $0 ~ /^JOB_INFO_1|^JOB_INFO_2/ ) { + gotstart = 1; + } + if( $0 ~ /^PRINTER_INFO_1|^PRINTER_INFO_2/ ) { gotstart = 1; } -- cgit From 3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 13 Dec 1999 13:27:58 +0000 Subject: first pass at updating head branch to be to be the same as the SAMBA_2_0 branch (This used to be commit 453a822a76780063dff23526c35408866d0c0154) --- source3/script/installbin.sh | 7 ++++++- source3/script/installcp.sh | 10 ++++++++-- source3/script/installscripts.sh | 1 + source3/script/installswat.sh | 2 +- source3/script/makeyodldocs.sh | 10 +--------- source3/script/mkproto.awk | 14 +++----------- source3/script/smbtar | 11 +++++++---- 7 files changed, 27 insertions(+), 28 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh index 22771ce5a0..69cca94295 100755 --- a/source3/script/installbin.sh +++ b/source3/script/installbin.sh @@ -26,10 +26,16 @@ for p in $*; do p2=`basename $p` echo Installing $p as $BINDIR/$p2 if [ -f $BINDIR/$p2 ]; then + rm -f $BINDIR/$p2.old mv $BINDIR/$p2 $BINDIR/$p2.old fi cp $p $BINDIR/ chmod $INSTALLPERMS $BINDIR/$p2 + + # this is a special case, mount needs this in a specific location + if [ $p2 = smbmount ]; then + ln -sf $BINDIR/$p2 /sbin/mount.smbfs + fi done @@ -43,4 +49,3 @@ binaries, man pages and shell scripts. EOF exit 0 - diff --git a/source3/script/installcp.sh b/source3/script/installcp.sh index 87b0ef1a8a..d0c5bf8ecc 100755 --- a/source3/script/installcp.sh +++ b/source3/script/installcp.sh @@ -21,8 +21,14 @@ fi done for p in $*; do - echo Creating codepage file $CODEPAGEDIR/codepage.$p - $BINDIR/make_smbcodepage c $p ${srcdir}/codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p + if [ -f ${srcdir}/codepages/codepage_def.$p ]; then + echo Creating codepage file $CODEPAGEDIR/codepage.$p + $BINDIR/make_smbcodepage c $p ${srcdir}/codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p + fi + if [ -f ${srcdir}/codepages/CP${p}.TXT ]; then + echo Creating unicode map $CODEPAGEDIR/unicode_map.$p + $BINDIR/make_unicodemap $p ${srcdir}/codepages/CP${p}.TXT $CODEPAGEDIR/unicode_map.$p + fi done diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh index 6d55317e9e..bff5423e7c 100755 --- a/source3/script/installscripts.sh +++ b/source3/script/installscripts.sh @@ -25,6 +25,7 @@ for p in $*; do p2=`basename $p` echo Installing $BINDIR/$p2 if [ -f $BINDIR/$p2 ]; then + rm -f $BINDIR/$p2.old mv $BINDIR/$p2 $BINDIR/$p2.old fi cp $p $BINDIR/ diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index cc2ab943d9..ab760cb545 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -6,7 +6,7 @@ SRCDIR=$2/ echo Installing SWAT in $SWATDIR -echo Installing the Samba Web Admisistration Tool +echo Installing the Samba Web Administration Tool for d in $SWATDIR $SWATDIR/help $SWATDIR/images $SWATDIR/include; do if [ ! -d $d ]; then diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh index c943224fe5..d0abaab7ae 100755 --- a/source3/script/makeyodldocs.sh +++ b/source3/script/makeyodldocs.sh @@ -55,16 +55,8 @@ do exit 1 fi cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" -# -# Copy to SWAT directory. -# - if [ $bn = "smb.conf.5" ]; then - rm -f ../../swat/help/smb.conf.5.html || echo "Cannot remove ../../swat/help/smb.conf.5.html" - - cp $bn.html ../../swat/help || echo "Cannot copy smb.conf.5.html to ../../swat/help/smb.conf.5.html" - fi rm -f $bn.html - ;; + ;; *) # # Non man-page YODL docs - just make html and text. diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index b286e1f7db..923624c3a2 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -90,23 +90,15 @@ END { { gotstart = 0; - if( $0 ~ /^connection_struct|^LOCAL_GRP|^DOMAIN_GRP|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) { + if( $0 ~ /^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) { gotstart = 1; } - if( $0 ~ /^JOB_INFO_1|^JOB_INFO_2/ ) { + if( $0 ~ /^LOCAL_GRP|^DOMAIN_GRP|^SMB_STRUCT_DIRENT|^SEC_ACL|^SEC_DESC|^SEC_DESC_BUF|^DOM_SID/ ) { gotstart = 1; } - if( $0 ~ /^PRINTER_INFO_1|^PRINTER_INFO_2/ ) { - gotstart = 1; - } - - if( $0 ~ /^UNISTR2|^LOCAL_GRP|^DOMAIN_GRP|^DOM_SID|^SEC_DESC/ ) { - gotstart = 1; - } - - if( $0 ~ /^const|^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT|dbg_Token/ ) { + if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { gotstart = 1; } if(!gotstart) { diff --git a/source3/script/smbtar b/source3/script/smbtar index f04eddc32b..cf3ff0ebe6 100644 --- a/source3/script/smbtar +++ b/source3/script/smbtar @@ -30,7 +30,9 @@ username=$LOGNAME # Default: same user name as in *nix verbose="2>/dev/null" # Default: no echo to stdout log="-d 2" newer="" +newerarg="" blocksize="" +blocksizearg="" clientargs="-c 'tarmode full'" tarcmd="c" tarargs="" @@ -62,7 +64,7 @@ Options: (Description) (Default) exit $ex } -echo Params count: $# +# echo Params count: $# # DEC OSF AKA Digital UNIX does not seem to return a value in OPTIND if # there are no command line params, so protect us against that ... @@ -97,7 +99,7 @@ while getopts riavl:b:d:N:s:p:x:u:Xt: c; do N) # compare with a file, test if [n]ewer if [ -f $OPTARG ]; then newer=$OPTARG - tarargs=${tarargs}N + newerarg="N" else echo >&2 $0: Warning, $OPTARG not found fi @@ -115,7 +117,7 @@ while getopts riavl:b:d:N:s:p:x:u:Xt: c; do *) echo >&2 "$0: Error, block size not numeric: -b $OPTARG" exit 1 esac - tarargs=${tarargs}b + blocksizearg="b" ;; p) # specify [p]assword to use password="$OPTARG" @@ -155,7 +157,8 @@ if [ -z "$verbose" ]; then echo "blocksize is $blocksize" fi +tarargs=${tarargs}${blocksizearg}${newerarg} + eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \ -E -N $log -D "'$cdcmd'" ${clientargs} \ -T${tarcmd}${tarargs} $blocksize $newer $tapefile '${1+"$@"}' $verbose - -- cgit From 32a965e09ce4befe971855e11e1fb5ceb51a9ed1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 13 Dec 1999 13:35:20 +0000 Subject: 2nd phase of head branch sync with SAMBA_2_0 - this delets all the files that were in the head branch but weren't in SAMBA_2_0 (This used to be commit d7b208786590b5a28618590172b8d523627dda09) --- source3/script/mysql_convert.pl | 433 ---------------------------------------- 1 file changed, 433 deletions(-) delete mode 100644 source3/script/mysql_convert.pl (limited to 'source3/script') diff --git a/source3/script/mysql_convert.pl b/source3/script/mysql_convert.pl deleted file mode 100644 index 1479ce62b7..0000000000 --- a/source3/script/mysql_convert.pl +++ /dev/null @@ -1,433 +0,0 @@ -#!/bin/env perl -# -# MYSQL Convert - Creates and initialises mysql tables for use by samba -# -# Copyright (C) Benjamin Kuit 1999, -# Copyright (C) Andrew Tridgell 1992-1999, -# Copyright (C) Luke Kenneth Casson Leighton 1996-1998, -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# -# -# Converts smbpasswd files into MySQL tables. -# Can understand Samba 1.19 and Samba 2.0 file formats. -# Assumes table structure: -# unix_name char(20) not null, -# unix_uid int(10) unsigned not null, -# nt_name char(20) not null, -# user_rid int(10) unsigned not null, -# smb_passwd char(32), -# smb_nt_passwd char(32), -# acct_ctrl int(10) unsigned not null, -# pass_last_set_time int(10) unsigned not null, -# unique (unix_name), -# unique (unix_uid) -# When given the --create option, mysql_convert will generate this -# statement. -# -# To move from flat file smbpasswd directly into a mysql table: -# -# mysql_convert.pl --db=samba --table=smbpasswd --user=samba --create --infile=smbpasswd -# -# Assumes mysql server on localhost, use --host if otherwise. -# To convert back to flat file: -# -# mysql_convert.pl --db=samba --table=smbpasswd --user=samba --outfile=smbpasswd -# -# If smbpasswd file already exists, use --file=append or --file=trash -# to determine whether to append or over-right the file. -# -# In converting from NT Server PDC to Samba PDC: -# Run pwdump on NT Server to generate an smbpasswd file (Samba 1.19 format), -# called say NTpasslist. -# then: -# -# mysql_convert.pl --db=samba --table=smbpasswd --user=samba --infile=NTpasslist --create --check -# -# The --check option will change the unix_uid field to the real uid -# value of respective users, also filter out users that dont exist on -# the system. -# -# If dont have mysql perl module: -# -# mysql_convert.pl --table=smbpasswd --infile=NTpasslist --outfile=mysql.txt -# -# Then use the mysql client: -# -# mysql -u samba < mysql.txt -# - -$ACB_DISABLED=0x0001; -$ACB_HOMDIRREQ=0x0002; -$ACB_PWNOTREQ=0x0004; -$ACB_TEMPDUP=0x0008; -$ACB_NORMAL=0x0010; -$ACB_MNS=0x0020; -$ACB_DOMTRUST=0x0040; -$ACB_WSTRUST=0x0080; -$ACB_SVRTRUST=0x0100; -$ACB_PWNOEXP=0x0200; -$ACB_AUTOLOCK=0x0400; - -sub getoptionval { - my ($option) = @_; - - my ($value) = ($option =~ /^[^=]+=\s*(\S.*\S)\s*$/ ); - - return $value; -} - -sub usage { - -print < # smbpasswd style file to read entries from - --outfile= # file to dump results to, format depending - # on --infile: - # With --infile: Dump mysql script queries - # Without --infile: Dump smbpasswd format - # from reading mysql database - --host= # Mysql Server name (default: localhost) - --db= # Mysql Database name - --user= # Mysql User - --password[=] # Mysql password for --user - --table=
# Mysql table - --create # Generate 'create table' query - --file=[trash|append] # Action to take if --outfile file exists - --check # Do not alter or skip bad uids - -EOUSAGE -exit 0; -} - -sub getpass { - my($prompt)=@_; - my($ret); - - print $prompt; - system "stty -echo"; - chomp($ret=); - system "stty echo"; - print "\n"; - $ret; -} - -sub next_entry { - my ($name,$uid,$lm,$nt,$f,$lct) = (); - - $name=""; - if ( not $infile ) { - ($name,$uid,$lm,$nt,$f,$lct) = $mysqlquery->fetchrow(); - } - else { - my $line=; - - return () if ( not $line ); - - chomp($line); - - next if ( $line !~ /^[^: ]+:\d+:/ ); - - ($name,$uid,$lm,$nt,$f,$lct) = split(/:/,$line); - - if ( $lct =~ /^LCT-/ ) { - # New Format smbpasswd file - my $flags=0; - - $flags |= $ACB_PWNOTREQ if ( $f =~ /N/ ); - $flags |= $ACB_DISABLED if ( $f =~ /D/ ); - $flags |= $ACB_HOMDIRREQ if ( $f =~ /H/ ); - $flags |= $ACB_TEMPDUP if ( $f =~ /T/ ); - $flags |= $ACB_NORMAL if ( $f =~ /U/ ); - $flags |= $ACB_MNS if ( $f =~ /M/ ); - $flags |= $ACB_WSTRUST if ( $f =~ /W/ ); - $flags |= $ACB_SVRTRUST if ( $f =~ /S/ ); - $flags |= $ACB_AUTOLOCK if ( $f =~ /L/ ); - $flags |= $ACB_PWNOEXP if ( $f =~ /X/ ); - $flags |= $ACB_DOMTRUST if ( $f =~ /I/ ); - - $f = $flags; - - $f = $ACB_NORMAL if ( not $f ); - - $lct =~ s/LCT-//; - $lct = (unpack("L",pack("H8",$lct)))[0]; - } - else { - # Old Format smbpasswd file - $f = 0; - $lct = time(); - if ( $lm =~ /^NO PASS/ ) { - $f |= $ACB_PWNOTREQ; - $lm = ""; - $nt = ""; - } - elsif ( $lm =~ /^XX/ ) { - $f |= $ACB_DISABLED; - - $lm = ""; - $nt = ""; - } - - if ( $name =~ /\$$/ ) { - $f |= $ACB_WSTRUST; - } - - $f = $ACB_NORMAL if ( not $f ); - } - } - return () if ( not $name ); - ($name,$uid,$lm,$nt,$f,$lct); -} - -sub do_query { - my ( $query ) = @_; - - chomp($query); - if ( $outfile ) { - print OUTFILE "$query;\n"; - } - else { - if ( not $mysqldb->query($query) ) { - print "$query: $Mysql::db_errstr\n"; - } - } -} - -sub do_file { - my ($file,$name,$uid,$lm,$nt,$f,$lct)=@_; - - my $strings = ""; - - $strings .= "N" if ( $f & $ACB_PWNOTREQ ); - $strings .= "D" if ( $f & $ACB_DISABLED ); - $strings .= "H" if ( $f & $ACB_HOMDIRREQ ); - $strings .= "T" if ( $f & $ACB_TEMPDUP ); - $strings .= "U" if ( $f & $ACB_NORMAL ); - $strings .= "M" if ( $f & $ACB_MNS ); - $strings .= "W" if ( $f & $ACB_WSTRUST ); - $strings .= "S" if ( $f & $ACB_SVRTRUST ); - $strings .= "L" if ( $f & $ACB_AUTOLOCK ); - $strings .= "X" if ( $f & $ACB_PWNOEXP ); - $strings .= "I" if ( $f & $ACB_DOMTRUST ); - - $f = sprintf( "[%-11s]", $strings ); - - $lct=uc("LCT-".(unpack("H8",pack("L","$lct")))[0]); - - $lm = "X"x32 if ( not $lm ); - $nt = "X"x32 if ( not $nt ); - - print $file "$name:$uid:$lm:$nt:$f:$lct\n"; -} - -$dbhost = "localhost"; - -for $option ( @ARGV ) { - if ( $option =~ /--outfile=/ ) { - $outfile = getoptionval($option); - } - elsif ( $option =~ /--infile=/ ) { - $infile = getoptionval($option); - } - elsif ( $option =~ /--db=/ ) { - $dbname = getoptionval($option); - } - elsif ( $option =~ /--user=/ ) { - $dbuser = getoptionval($option); - } - elsif ( $option =~ /--host=/ ) { - $dbhost = getoptionval($option); - } - elsif ( $option =~ /--password/ ) { - $dbpasswd = getoptionval($option); - $need_password = "yes" - } - elsif ( $option =~ /--table=/ ) { - $dbtable = getoptionval($option); - } - elsif ( $option =~ /--create/ ) { - $create_table = "yes"; - } - elsif ( $option =~ /--file=/ ) { - $file_action = getoptionval($option); - } - elsif ( $option =~ /--check/ ) { - $check = "yes"; - } - else { - print "Unknown option: $option\n"; - $unknown = "yes"; - } -} - -&usage if ( $unknown eq "yes" ); - -if ( ( not $infile ) && ( not $outfile ) && ( $create_table ne "yes" ) ) { - print "Need file to read from or write to\n"; - &usage; -} -elsif ( $infile && $outfile ) { - if ( not $dbtable ) { - print "Need --table to create queries\n"; - exit 1; - } - - # Reading a smbpasswd file, dumping queries into an file which - # can be used for a mysql script - # --db* options are ignored. - - $ignored = ""; - $ignored .= " --db" if ( $dbname ); - $ignored .= " --user" if ( $dbuser ); - $ignored .= " --password" if ( $dbuser ); - - if ( $ignored ) { - print "Ignoring options: $ignored\n"; - } -} -elsif ( (not $dbname) || (not $dbtable) || (not $dbuser) ) { - print "Missing database particulars:\n"; - print " --db=??\n" if ( not $dbname ); - print " --user=??\n" if ( not $dbuser ); - print " --table=??\n" if ( not $dbtable ); - &usage; -} -else { - use Mysql; - - if ( ($need_password eq "yes") && ( not $dbpasswd )) { - $dbpasswd = getpass("Enter MySQL password for $dbuser: "); - } - $mysqldb = Connect Mysql($dbhost,$dbname,$dbuser,$dbpasswd); - - if ( not $mysqldb ) { - print "Cannot connect to database: $Mysql::db_errstr\n"; - exit 1; - } - - if ( $outfile ) { - $mysqlquery = $mysqldb->query("select unix_name,unix_uid,smb_passwd,smb_nt_passwd,acct_ctrl,pass_last_set_time from $dbtable"); - - if ( not $mysqlquery ) { - print "MySQL Query failed: $Mysql::db_errstr\n"; - exit 1; - } - } -} - -if ( $create_table eq "yes" ) { - $create_table_query=< Date: Tue, 21 Dec 1999 04:54:30 +0000 Subject: first cut at using the tdb code for the connections structure, the SWAT status page and smbstatus. It made the code _much_ simpler, I wish we'd done a database module a long time ago! (This used to be commit 4951755413c11d4c5b9af4699a6e622056d52433) --- source3/script/mkproto.awk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 923624c3a2..fd0cbcd2f8 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -98,6 +98,10 @@ END { gotstart = 1; } + if( $0 ~ /^TDB_CONTEXT|^TDB_DATA/ ) { + gotstart = 1; + } + if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { gotstart = 1; } -- cgit From e7851ce52e408db4d78a45066ed042708203e7a1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 22 Dec 1999 01:29:22 +0000 Subject: First cut at unicode sys_xx functions. Now to start moving upwards..... Jeremy. (This used to be commit b5eb009cc3cfd1adc044e91911d59acdb54c30cb) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index fd0cbcd2f8..c24dfac98c 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -98,7 +98,7 @@ END { gotstart = 1; } - if( $0 ~ /^TDB_CONTEXT|^TDB_DATA/ ) { + if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t/ ) { gotstart = 1; } -- cgit From 8dc6098539c9cc210a2d3c2366a65d00aeaeba95 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 23 Dec 1999 01:41:19 +0000 Subject: Awk script to create #include C code from unicode upper -> lower case map. Jeremy. (This used to be commit e59fe73f19cdb207db55ea4ba0073f48af2e440e) --- source3/script/makeunicodecasemap.awk | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 source3/script/makeunicodecasemap.awk (limited to 'source3/script') diff --git a/source3/script/makeunicodecasemap.awk b/source3/script/makeunicodecasemap.awk new file mode 100644 index 0000000000..4a4640da85 --- /dev/null +++ b/source3/script/makeunicodecasemap.awk @@ -0,0 +1,59 @@ +function reset_vals() { + upperstr = ""; + lowerstr = ""; + flagstr = "0"; +} + +function print_val() { + upperstr = $13; + lowerstr = $14; + if ( upperstr == "" ) + upperstr = strval; + if ( lowerstr == "" ) + lowerstr = strval; + + if ( $3 == "Lu" ) + flagstr = sprintf("%s|%s", flagstr, "UNI_UPPER"); + if ( $3 == "Ll" ) + flagstr = sprintf("%s|%s", flagstr, "UNI_LOWER"); + if ( val >= 48 && val <= 57) + flagstr = sprintf("%s|%s", flagstr, "UNI_DIGIT"); + if ((val >= 48 && val <= 57) || (val >= 65 && val <= 70) || (val >=97 && val <= 102)) + flagstr = sprintf("%s|%s", flagstr, "UNI_XDIGIT"); + if ( val == 32 || (val >=9 && val <= 13)) + flagstr = sprintf("%s|%s", flagstr, "UNI_SPACE"); + if( index(flagstr, "0|") == 1) + flagstr = substr(flagstr, 3, length(flagstr) - 2); + printf("{ 0x%s, 0x%s, %s }, \t\t\t/* %s %s */\n", lowerstr, upperstr, flagstr, strval, $2); + val++; + strval=sprintf("%04X", val); + reset_vals(); +} + +BEGIN { + val=0 + FS=";" + strval=sprintf("%04X", val); + reset_vals(); +} + +{ + if ( $1 == strval ) { + print_val(); + } else { + while ( $1 != strval) { + printf("{ 0x%04X, 0x%04X, 0 }, \t\t\t/* %s NOMAP */\n", val, val, strval); + val++; + strval=sprintf("%04X", val); + } + print_val(); + } +} + +END { + while ( val < 65536 ) { + printf("{ 0, 0x%04X, 0x%04X }, \t\t\t/* %s NOMAP */\n", val, val, strval); + val++; + strval=sprintf("%04X", val); + } +} -- cgit From 7c51c5ddf31cc990610d07edb1cbe7265288e2c3 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 23 Dec 1999 01:57:43 +0000 Subject: Samba now includes a full ucs2 upper to lower case (and vica versa) map table. Jeremy. (This used to be commit d7b72d4cbfb6bd1925abc7f95c1180d3d65856a5) --- source3/script/makeunicodecasemap.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/makeunicodecasemap.awk b/source3/script/makeunicodecasemap.awk index 4a4640da85..8424b6c672 100644 --- a/source3/script/makeunicodecasemap.awk +++ b/source3/script/makeunicodecasemap.awk @@ -52,7 +52,7 @@ BEGIN { END { while ( val < 65536 ) { - printf("{ 0, 0x%04X, 0x%04X }, \t\t\t/* %s NOMAP */\n", val, val, strval); + printf("{ 0x%04X, 0x%04X, 0 }, \t\t\t/* %s NOMAP */\n", val, val, strval); val++; strval=sprintf("%04X", val); } -- cgit From 5e9f5591873fc5c5b5c8dbb0e29a080b8afe9966 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 5 Jan 2000 06:36:36 +0000 Subject: implemented talloc() as described on samba-technical. This fixes the lp_string() bug properly. we still need to add lp_talloc_free() calls in all the main event loops, I've only put it in smbd and nmbd thus far. (This used to be commit aa7f81552540f5dca2c146f5edd805611d5b390f) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index c24dfac98c..8ef414266a 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -98,7 +98,7 @@ END { gotstart = 1; } - if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t/ ) { + if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX/ ) { gotstart = 1; } -- cgit From ace4006c9f7ac16b3c09b1b2222f607bccfa040e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 26 Jan 2000 21:25:35 +0000 Subject: Added hash-based stat cache code from Ying Chen. Jeremy. (This used to be commit b62a1bd6328f5894ae1a2fef3ef6fc66304ade52) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 8ef414266a..a8c807a10c 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -98,7 +98,7 @@ END { gotstart = 1; } - if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX/ ) { + if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element/ ) { gotstart = 1; } -- cgit From c23e01d049cc7aee34e8ac83efeb74c09aa257a2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 9 May 2000 13:28:19 +0000 Subject: the beginnings of a new scheme I've working on to allow an easier head/tng merge. It goes something like this: - headers from tng get copied over one at a time - the old headers get renamed to *_old.h - server side code that used the old headers gets a #define OLD_NTDOMAIN 1 #undef OLD_NTDOMAIN at the start and end of the code - mkproto.awk recognises these special defines and does magic stuff so that each .c file sees the right headers - we start moving the rpc client libraries from tng to head. if this goes OK then, in theory, we should be able to move the client side rpc code from tng to head without disturbing the existing head server side code. Then when that works we can consider merging the server side. it remains to be seen if this scheme will work. So far I've moved rpc_samr.h and don't seem to have broken anything. Note this this is still a very delicate operation, as at every step of the way I want to keep head fully functional. Please don't take part unless you discuss it with me first. (This used to be commit f76c037255a6a79d11bec65e863e009a41a4f0fd) --- source3/script/mkproto.awk | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index a8c807a10c..0b9c1f784e 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -23,10 +23,6 @@ END { print "/*The following definitions come from ",FILENAME," */" print "" current_file=FILENAME -# if (current_file=="ldap.c") { -# print "#ifdef USE_LDAP" -# use_ldap_define = 1; -# } } if (inheader) { if (match($0,"[)][ \t]*$")) { @@ -39,6 +35,20 @@ END { } } +# special handling for code merge of TNG to head +/^#define OLD_NTDOMAIN 1/ { + printf "#if OLD_NTDOMAIN\n" +} +/^#undef OLD_NTDOMAIN/ { + printf "#endif\n" +} +/^#define NEW_NTDOMAIN 1/ { + printf "#if NEW_NTDOMAIN\n" +} +/^#undef NEW_NTDOMAIN/ { + printf "#endif\n" +} + # we handle the loadparm.c fns separately /^FN_LOCAL_BOOL/ { -- cgit From 136544268460e56d7b551ae9efac9dc0a6b2830e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 1 Jun 2000 02:44:17 +0000 Subject: More stuff I cvan't afford to lose. I'm realizing how dependent I am on this bloody CVS link.... Jeremy. (This used to be commit 864e7bde0e804edbb2425b9c4c7ff271553f8169) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 0b9c1f784e..734db3ca53 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -108,7 +108,7 @@ END { gotstart = 1; } - if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element/ ) { + if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE/ ) { gotstart = 1; } -- cgit From 84d40095e1d7ba5c66cabfd2d41012162d652970 Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Thu, 8 Jun 2000 13:56:07 +0000 Subject: added a NET_USER_INFO_3 struct to user_struct. register_vuid fills it with constructed info. (This used to be commit b1889e4334012b1b2caa604b859da4271509fc87) --- source3/script/mkproto.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 734db3ca53..7ae89b7467 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -100,11 +100,11 @@ END { { gotstart = 0; - if( $0 ~ /^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) { + if( $0 ~ /^const|^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) { gotstart = 1; } - if( $0 ~ /^LOCAL_GRP|^DOMAIN_GRP|^SMB_STRUCT_DIRENT|^SEC_ACL|^SEC_DESC|^SEC_DESC_BUF|^DOM_SID/ ) { + if( $0 ~ /^vuser_key|^UNISTR2|^LOCAL_GRP|^DOMAIN_GRP|^SMB_STRUCT_DIRENT|^SEC_ACL|^SEC_DESC|^SEC_DESC_BUF|^DOM_SID/ ) { gotstart = 1; } -- cgit From 33f6a1d9bb7ffed681085261a78d5ef4297f73de Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 3 Jul 2000 04:28:29 +0000 Subject: first pass at merging rpcclient from TNG to HEAD. You can get a semi-connection and a rpcclient prompt, but no functionality there yet. Will be a few more days on that. --jerry (This used to be commit 269051aa0c52728278a1d290148564f11cf7f189) --- source3/script/mkproto.awk | 8 ++++++-- source3/script/mkproto.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100755 source3/script/mkproto.sh (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 7ae89b7467..6e74b0d85f 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -2,8 +2,12 @@ BEGIN { inheader=0; # use_ldap_define = 0; current_file=""; - print "#ifndef _PROTO_H_" - print "#define _PROTO_H_" + if (headername=="") { + headername="_PROTO_H_"; + } + + print "#ifndef",headername + print "#define",headername print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */" print "" } diff --git a/source3/script/mkproto.sh b/source3/script/mkproto.sh new file mode 100755 index 0000000000..4dbe4c204e --- /dev/null +++ b/source3/script/mkproto.sh @@ -0,0 +1,41 @@ +#! /bin/sh + +LANG=C; export LANG +LC_ALL=C; export LC_ALL +LC_COLLATE=C; export LC_COLLATE + +if [ $# -lt 3 ] +then + echo "Usage: $0 awk [-h headerdefine] outputheader proto_obj" + exit 1 +fi + +awk="$1" +shift + +if [ x"$1" = x-h ] +then + headeropt="-v headername=$2" + shift; shift; +else + headeropt="" +fi + +header="$1" +shift +headertmp="$header.$$.tmp~" + +proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped'`" + +echo creating $header + +${awk} $headeropt \ + -f script/mkproto.awk $proto_src > $headertmp + +if cmp -s $header $headertmp 2>/dev/null +then + echo "$header unchanged" + rm $headertmp +else + mv $headertmp $header +fi -- cgit From dc7b20a47d52e8eed87a93150cb9f11384157676 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 6 Jul 2000 06:48:01 +0000 Subject: Make prototypes for functions returning an enum nss_status. (This used to be commit dac9c934ac3932fb9870417e8f712a880dd25e45) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 6e74b0d85f..6afbfb090e 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -112,7 +112,7 @@ END { gotstart = 1; } - if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE/ ) { + if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum nss_status/ ) { gotstart = 1; } -- cgit From 05fdec749d34812c437c8f4dd318af11ebb9561e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 18 Jul 2000 05:10:26 +0000 Subject: grab functions that return RPC_HND_NODE (declared in include/util_list.h) -- jerry (This used to be commit ccebd70df2c096de1b183ae072c2c720e2277c6f) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 6afbfb090e..766b1f093b 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -108,7 +108,7 @@ END { gotstart = 1; } - if( $0 ~ /^vuser_key|^UNISTR2|^LOCAL_GRP|^DOMAIN_GRP|^SMB_STRUCT_DIRENT|^SEC_ACL|^SEC_DESC|^SEC_DESC_BUF|^DOM_SID/ ) { + if( $0 ~ /^vuser_key|^UNISTR2|^LOCAL_GRP|^DOMAIN_GRP|^SMB_STRUCT_DIRENT|^SEC_ACL|^SEC_DESC|^SEC_DESC_BUF|^DOM_SID|^RPC_HND_NODE/ ) { gotstart = 1; } -- cgit From 06e4f11acd3aedd6c8e4adf365932a01eca902b8 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 4 Aug 2000 00:59:09 +0000 Subject: Fixed up the user/group contexts when using authenticated pipes. Added a become_root()/unbecome_root() (push/pop security context) around the initgroups() call to ensure it would succeed. Hmmm - I wonder if this call being done as non-root might explain any "group access" bugs we've had in the past.... Jeremy. (This used to be commit 06a65972e872f37d88b84f22ea714feebd38f6c0) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 766b1f093b..b36eaca33b 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -112,7 +112,7 @@ END { gotstart = 1; } - if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum nss_status/ ) { + if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum nss_status|^NT_USER_TOKEN/ ) { gotstart = 1; } -- cgit From ace6739f5e8b9cc3139c5ea1d42ab481856dd4c5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 25 Aug 2000 20:44:33 +0000 Subject: vfs write data fix. Fix for name matching in addtosmbpass Jeremy. (This used to be commit 85738b7ee1ea6d88999d6aedc51a2daf545cb8b8) --- source3/script/addtosmbpass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/addtosmbpass b/source3/script/addtosmbpass index 84a7e6fac0..bc82851c52 100644 --- a/source3/script/addtosmbpass +++ b/source3/script/addtosmbpass @@ -41,7 +41,7 @@ BEGIN { { print $0; for(name in names) { - if($1 ~ name) { + if($1 == name) { delete names[name]; } } -- cgit From 9fede0dc0dbad51528cd1384023d24549c3f0ba4 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 13 Nov 2000 23:03:34 +0000 Subject: Large commit which restructures the local password storage API. Currently the only backend which works is smbpasswd (tdb, LDAP, and NIS+) are broken, but they were somewhat broken before. :) The following functions implement the storage manipulation interface /*The following definitions come from passdb/pdb_smbpasswd.c */ BOOL pdb_setsampwent (BOOL update); void pdb_endsampwent (void); SAM_ACCOUNT* pdb_getsampwent (void); SAM_ACCOUNT* pdb_getsampwnam (char *username); SAM_ACCOUNT* pdb_getsampwuid (uid_t uid); SAM_ACCOUNT* pdb_getsampwrid (uint32 rid); BOOL pdb_add_sam_account (SAM_ACCOUNT *sampass); BOOL pdb_update_sam_account (SAM_ACCOUNT *sampass, BOOL override); BOOL pdb_delete_sam_account (char* username); There is also a host of pdb_set..() and pdb_get..() functions for manipulating SAM_ACCOUNT struct members. Note that the struct passdb_ops {} has gone away. Also notice that struct smb_passwd (formally in smb.h) has been moved to passdb/pdb_smbpasswd.c and is not accessed outisde of static internal functions in this file. All local password searches should make use of the the SAM_ACCOUNT struct and the previously mentioned functions. I'll write some documentation for this later. The next step is to fix the TDB passdb backend, then work on spliting the backends out into share libraries, and finally get the LDAP backend going. What works and may not: o domain logons from Win9x works o domain logons from WinNT 4 works o user and group enumeration as implemented by Tim works o file and print access works o changing password from Win9x & NT ummm...i'll fix this tonight :) If I broke anything else, just yell and I'll fix it. I think it should be fairly quite. -- jerry (This used to be commit 0b92d0838ebdbe24f34f17e313ecbf61a0301389) --- source3/script/mkproto.awk | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index b36eaca33b..9a85e89ced 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -108,17 +108,22 @@ END { gotstart = 1; } - if( $0 ~ /^vuser_key|^UNISTR2|^LOCAL_GRP|^DOMAIN_GRP|^SMB_STRUCT_DIRENT|^SEC_ACL|^SEC_DESC|^SEC_DESC_BUF|^DOM_SID|^RPC_HND_NODE/ ) { + if( $0 ~ /^vuser_key|^UNISTR2|^LOCAL_GRP|^DOMAIN_GRP|^SMB_STRUCT_DIRENT|^SEC_ACL|^SEC_DESC|^SEC_DESC_BUF|^DOM_SID|^RPC_HND_NODE|^BYTE/ ) { gotstart = 1; } - if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum nss_status|^NT_USER_TOKEN/ ) { + if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum nss_status|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { gotstart = 1; } if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { gotstart = 1; } + + if( $0 ~ /^SAM_ACCT_INFO_NODE/ ) { + gotstart = 1; + } + if(!gotstart) { next; } -- cgit From 70922b9bbe412dc43397ecfd3feeb01169ed0b96 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 6 Dec 2000 23:24:31 +0000 Subject: Cause smbd to use the new posix_acls code, not the old unix_acls code. Currently does exactly the same thing (returns ACLs the same way). This code is written to try and get a POSIX ACL via the abstract sys_XX interface, then fall back to providing a UNIX based ACL if the calls fail. Seems to work. Next step is to add a --with-posix-acls to configure.in and then check on a POSIX ACL system that a complex ACL is returned correctly as an NT ACL. Note that the ACL set (a more complex problem) is not addressed yet. Jeremy. (This used to be commit 4339e20202a876dbadc07980b731f711463b7299) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 9a85e89ced..c66fe07972 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -120,7 +120,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T/ ) { gotstart = 1; } -- cgit From 2db833d5f1d6ecf7ee1c0d30437a2bdaa95c3fff Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 21 Dec 2000 23:27:51 +0000 Subject: If extra arguments passed make yodl docs for these files rather than *.yo (This used to be commit b57fbcca06c7a69863f69628745f8fcbc13419bd) --- source3/script/makeyodldocs.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh index d0abaab7ae..5b54df033e 100755 --- a/source3/script/makeyodldocs.sh +++ b/source3/script/makeyodldocs.sh @@ -1,5 +1,11 @@ -#!/bin/sh -v +#!/bin/sh SRCDIR=$1 +shift +FILES=$@ + +if test -z $FILES; then + FILES=*.yo +fi YODLDIR=$SRCDIR/../docs/yodldocs MANPAGEDIR=$SRCDIR/../docs/manpages @@ -24,7 +30,7 @@ fi cd $YODLDIR -for d in *.yo +for d in $FILES do # -- cgit From 3380ffae9c231a34406dd694c9ab03bb0b6d8070 Mon Sep 17 00:00:00 2001 From: David O'Neill Date: Thu, 11 Jan 2001 20:41:19 +0000 Subject: Changes from APPLIANCE_HEAD: testsuite/printing/psec.c - Use lock directory from smb.conf parameter when peeking at the ntdrivers.tdb file. source/rpc_parse/parse_sec.c - fix typo in debug message source/script/installbin.sh - create private directory as part of 'make install'. source/nsswitch/winbindd_cache.c source/nsswitch/winbindd_idmap.c source/passdb/secrets.c source/smbd/connection.c - always convert tdb key to unix code-page when generating. source/printing/nt_printing.c - always convert tdb key to unix code-page when generating. - don't prepend path to a filename that is NULL in add_a_printer_driver_3(). source/rpc_server/srv_spoolss_nt.c - always convert tdb key to unix code-page when generating. - don't prepend server name to a path/filename that is NULL in the fill_printer_driver_info functions. source/printing/printing.c - always convert tdb key to unix code-page when generating. - move access check for print_queue_purge() outside of job delete loop. source/smbd/unix_acls.c - fix for setting ACLs (this got missed earlier) source/lib/messages.c - trivial sync with appliance_head (This used to be commit 376601d17d53ef7bfaafa576bd770e554516e808) --- source3/script/installbin.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh index 69cca94295..77bded6420 100755 --- a/source3/script/installbin.sh +++ b/source3/script/installbin.sh @@ -11,7 +11,7 @@ shift shift shift -for d in $BASEDIR $BINDIR $LIBDIR $VARDIR; do +for d in $BASEDIR $BINDIR $LIBDIR $VARDIR $BASEDIR/private; do if [ ! -d $d ]; then mkdir $d if [ ! -d $d ]; then -- cgit From 93261949f5f1f96c513d4651117ee0c462a46e63 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Fri, 12 Jan 2001 21:47:01 +0000 Subject: merge from 2.0 branch for installing Using Samba book files (This used to be commit b04bd9ea2409ef02737fd570ce80daf167e41067) --- source3/script/installswat.sh | 76 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 68 insertions(+), 8 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index ab760cb545..8afbc52eba 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -3,21 +3,23 @@ SWATDIR=$1 SRCDIR=$2/ +BOOKDIR=$3 echo Installing SWAT in $SWATDIR - echo Installing the Samba Web Administration Tool for d in $SWATDIR $SWATDIR/help $SWATDIR/images $SWATDIR/include; do -if [ ! -d $d ]; then - mkdir $d -if [ ! -d $d ]; then - echo Failed to make directory $d, does $USER have privileges? - exit 1 -fi -fi + if [ ! -d $d ]; then + mkdir $d + if [ ! -d $d ]; then + echo Failed to make directory $d, does $USER have privileges? + exit 1 + fi + fi done +# Install images + for f in $SRCDIR../swat/images/*.gif; do FNAME=$SWATDIR/images/`basename $f` echo $FNAME @@ -25,13 +27,24 @@ for f in $SRCDIR../swat/images/*.gif; do chmod 0644 $FNAME done +# Install html help + for f in $SRCDIR../swat/help/*.html; do FNAME=$SWATDIR/help/`basename $f` echo $FNAME + if [ "x$BOOKDIR" = "x" ]; then + cat $f | sed 's/@BOOKDIR@.*$//' > $f.tmp + else + cat $f | sed 's/@BOOKDIR@//' > $f.tmp + fi + f=$f.tmp cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + rm -f $f chmod 0644 $FNAME done +# Install html documentation + for f in $SRCDIR../docs/htmldocs/*.html; do FNAME=$SWATDIR/help/`basename $f` echo $FNAME @@ -39,6 +52,8 @@ for f in $SRCDIR../docs/htmldocs/*.html; do chmod 0644 $FNAME done +# Install "server-side" includes + for f in $SRCDIR../swat/include/*.html; do FNAME=$SWATDIR/include/`basename $f` echo $FNAME @@ -46,6 +61,51 @@ for f in $SRCDIR../swat/include/*.html; do chmod 0644 $FNAME done +# Install Using Samba book + +if [ "x$BOOKDIR" != "x" ]; then + + # Create directories + + for d in $BOOKDIR $BOOKDIR/figs $BOOKDIR/gifs; do + if [ ! -d $d ]; then + mkdir $d + if [ ! -d $d ]; then + echo Failed to make directory $d, does $USER have privileges? + exit 1 + fi + fi + done + + # HTML files + + for f in $SRCDIR../docs/htmldocs/using_samba/*.html; do + FNAME=$BOOKDIR/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done + + # Figures + + for f in $SRCDIR../docs/htmldocs/using_samba/figs/*.gif; do + FNAME=$BOOKDIR/figs/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done + + # Gifs + + for f in $SRCDIR../docs/htmldocs/using_samba/gifs/*.gif; do + FNAME=$BOOKDIR/gifs/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done + +fi + cat << EOF ====================================================================== The SWAT files have been installed. Remember to read the swat/README -- cgit From 9305a8f71029054c89bc876b6d5c17015be2bc51 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sun, 25 Mar 2001 06:05:57 +0000 Subject: merge from 2.2 (This used to be commit b6227751f117ad507838db0cf0032093f6251646) --- source3/script/scancvslog.pl | 96 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100755 source3/script/scancvslog.pl (limited to 'source3/script') diff --git a/source3/script/scancvslog.pl b/source3/script/scancvslog.pl new file mode 100755 index 0000000000..6e05c4c3d6 --- /dev/null +++ b/source3/script/scancvslog.pl @@ -0,0 +1,96 @@ +#!/usr/bin/perl +require"timelocal.pl"; + +# +# usage scancvslog.pl logfile starttime tag +# +# this will extract all entries from the specified cvs log file +# that have a date later than or equal to starttime and a tag +# value of tag. If starttime is not specified, all entries are +# extracted. If tag is not specified then entries for all +# branches are extracted. starttime must be specified as +# "monthname day, year" +# +# Example to extract all entries for SAMBA_2_2 branch from the +# log file named cvs.log +# +# scancvslog.pl cvs.log "" SAMBA_2_2 +# +# +# To extract all log entries after Jan 10, 1999 (Note month name +# must be spelled out completely). +# +# scancvslog.pl cvs.log "January 10, 1999" +# + +open(INFILE,@ARGV[0]) || die "Unable to open @ARGV[0]\n"; + +%Monthnum = ( + "January", 0, + "February", 1, + "March", 2, + "April", 3, + "May", 4, + "June", 5, + "July", 6, + "August", 7, + "September", 8, + "October", 9, + "November", 10, + "December", 11 +); + +$Starttime = (@ARGV[1]) ? &make_time(@ARGV[1]) : 0; +$Tagvalue = @ARGV[2]; + +while (&get_entry) { + $_=$Entry[0]; + s/^Date:\s*\w*\s*(\w*)\s*(\w*),\s*(\w*).*/$1 $2 $3/; + $Testtime = &make_time($_); + $Testtag = &get_tag; + if (($Testtime >= $Starttime) && ($Tagvalue eq $Testtag)) { + print join("\n",@Entry),"\n"; + } +} +close(INFILE); + +sub make_time { + $_ = @_[0]; + s/,//; + ($month, $day, $year) = split(" ",$_); + if (($year < 1900)||($day < 1)||($day > 31)||not length($Monthnum{$month})) { + print "Bad date format @_[0]\n"; + print "Date needs to be specified as \"Monthname day, year\"\n"; + print "eg: \"January 10, 1999\"\n"; + exit 1; + } + $year = ($year == 19100) ? 2000 : $year; + $month = $Monthnum{$month}; + $Mytime=&timelocal((0,0,0,$day,$month,$year)); +} + +sub get_tag { + @Mytag = grep (/Tag:/,@Entry); + $_ = @Mytag[0]; + s/^.*Tag:\s*(\w*).*/$1/; + return $_; +} + +sub get_entry { + @Entry=(); + if (not eof(INFILE)) { + while (not eof(INFILE)) { + $_ = ; + chomp $_; + next if (not ($_)); + if (/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/) { + next if ($#Entry == -1); + push(Entry,$_); + return @Entry; + } else { + push(Entry,$_); + } + } + } + return @Entry; +} -- cgit From 95004fc9dd862218224d060e012a65a164b14c60 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 23 Apr 2001 23:44:25 +0000 Subject: row of asteriks that indicates new entry must start at beginning of line. (This used to be commit df4a31580c537b2008db76a2009d21f7f9ac7285) --- source3/script/scancvslog.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/scancvslog.pl b/source3/script/scancvslog.pl index 6e05c4c3d6..b1114f5706 100755 --- a/source3/script/scancvslog.pl +++ b/source3/script/scancvslog.pl @@ -83,7 +83,7 @@ sub get_entry { $_ = ; chomp $_; next if (not ($_)); - if (/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/) { + if (/^\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/) { next if ($#Entry == -1); push(Entry,$_); return @Entry; -- cgit From 7c7770a3662d8173d646f5b15497d031e65e0b57 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 27 Apr 2001 19:03:29 +0000 Subject: Patch from Frédéric Blanc to correctly uninstall codepages. Jeremy. (This used to be commit 231f1f44c314d5d614c9f2745a108839a26cfc0d) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source3/script/uninstallcp.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/script') diff --git a/source3/script/uninstallcp.sh b/source3/script/uninstallcp.sh index bd7013c358..2a9e9d509a 100755 --- a/source3/script/uninstallcp.sh +++ b/source3/script/uninstallcp.sh @@ -10,13 +10,13 @@ if [ ! -d $CPDIR ]; then fi for p in $*; do - if [ ! -f $CPDIR/codepage.$p ]; then - echo $CPDIR/codepage.$p does not exist! + if [ ! -f $CPDIR/unicode_map.$p ]; then + echo $CPDIR/unicode_map.$p does not exist! else - echo Removing $CPDIR/codepage.$p - rm -f $CPDIR/codepage.$p - if [ -f $CPDIR/codepage.$p ]; then - echo Cannot remove $CPDIR/codepage.$p... does $USER have privileges? + echo Removing $CPDIR/unicode_map.$p + rm -f $CPDIR/unicode_map.$p + if [ -f $CPDIR/unicode_map.$p ]; then + echo Cannot remove $CPDIR/unicode_map.$p... does $USER have privileges? fi fi done -- cgit From d095b5249cf9e1496ad5a3d6b5acb77af2c587a7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 28 Apr 2001 13:49:34 +0000 Subject: - added test for vasprintf - cleaned up GNUC printf attribute macros - added enum handling in mkproto - removed non-vararg code - made slprintf and vslprintf just macros for snprintf and vsnprintf - don't need slprintf code any more (This used to be commit c7aeb2254dfc3cd0aa0b6c0bdd426f9323be0ddf) --- source3/script/mkproto.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index c66fe07972..13ff399da0 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -112,11 +112,11 @@ END { gotstart = 1; } - if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum nss_status|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { + if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { gotstart = 1; } - if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^enum remote_arch_types|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { + if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { gotstart = 1; } -- cgit From 6056766247fc2e7206d6bb13ad1ac467663ac298 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 7 May 2001 03:55:54 +0000 Subject: merge some fixes from 2.2 (This used to be commit 7e57adf2a039cb5b6458496f9190c9c642645600) --- source3/script/installswat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 8afbc52eba..8868d4cbb1 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -3,7 +3,7 @@ SWATDIR=$1 SRCDIR=$2/ -BOOKDIR=$3 +BOOKDIR=$SWATDIR/using_samba echo Installing SWAT in $SWATDIR echo Installing the Samba Web Administration Tool -- cgit From 13dd825d57d2e7aa9fa5dc787083dae230b75bd6 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 14 May 2001 04:11:39 +0000 Subject: Cosmetic changes in make proto output. (This used to be commit 858290d63b8e4300f2a1a334675566beb6881993) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 13ff399da0..5c3594f7c9 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -24,7 +24,7 @@ END { # use_ldap_define = 0; # } print "" - print "/*The following definitions come from ",FILENAME," */" + print "/* The following definitions come from",FILENAME," */" print "" current_file=FILENAME } -- cgit From 82970b833cca505fcb5013c0264edde5a79cbd2e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 20 Jun 2001 16:54:32 +0000 Subject: initial support for paramter type P_LIST it will avoid problems with lists being longer than 1024 bytes just now only ip list parameters have been converted to the new type (hosts allow, hosts deny, ssl hosts, ssl hosts resign) (This used to be commit e1572f85d6247b760db10825b2fa688d7ed50bd3) --- source3/script/mkproto.awk | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 5c3594f7c9..76a61193a2 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -60,6 +60,11 @@ END { printf "BOOL %s(int );\n", a[2] } +/^FN_LOCAL_LIST/ { + split($0,a,"[,()]") + printf "char **%s(int );\n", a[2] +} + /^FN_LOCAL_STRING/ { split($0,a,"[,()]") printf "char *%s(int );\n", a[2] @@ -80,6 +85,11 @@ END { printf "BOOL %s(void);\n", a[2] } +/^FN_GLOBAL_LIST/ { + split($0,a,"[,()]") + printf "char **%s(void);\n", a[2] +} + /^FN_GLOBAL_STRING/ { split($0,a,"[,()]") printf "char *%s(void);\n", a[2] -- cgit From 87fbb7092b8f8b2f0db0f361c3d625e19de57cd9 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 4 Jul 2001 07:15:53 +0000 Subject: The big character set handling changeover! This commit gets rid of all our old codepage handling and replaces it with iconv. All internal strings in Samba are now in "unix" charset, which may be multi-byte. See internals.doc and my posting to samba-technical for a more complete explanation. (This used to be commit debb471267960e56005a741817ebd227ecfc512a) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 76a61193a2..d37aa04761 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -126,7 +126,7 @@ END { gotstart = 1; } - if( $0 ~ /^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { + if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { gotstart = 1; } -- cgit From e8e98c9ea0690e3acf1126b50882e59e1056c7b3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 Aug 2001 08:19:43 +0000 Subject: converted smbd to use NTSTATUS by default major changes include: - added NSTATUS type - added automatic mapping between dos and nt error codes - changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT() these calls auto-translate to the client error code system - got rid of the cached error code and the writebmpx code We eventually will need to also: - get rid of BOOL, so we don't lose error info - replace all ERROR_DOS() calls with ERROR_NT() calls but that is too much for one night (This used to be commit 83d9896c1ea8be796192b51a4678c2a3b87f7518) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index d37aa04761..a541f2f2b0 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -126,7 +126,7 @@ END { gotstart = 1; } - if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { + if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { gotstart = 1; } -- cgit From 1d726fe0e054be9017309186c24b24d032e85636 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Mon, 27 Aug 2001 18:24:04 +0000 Subject: new logs use abbreviated month names. Add this to date conversion (This used to be commit 8021669b167053b5500f035c9c50d1327d73c232) --- source3/script/scancvslog.pl | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/scancvslog.pl b/source3/script/scancvslog.pl index b1114f5706..c39f9111c1 100755 --- a/source3/script/scancvslog.pl +++ b/source3/script/scancvslog.pl @@ -37,7 +37,19 @@ open(INFILE,@ARGV[0]) || die "Unable to open @ARGV[0]\n"; "September", 8, "October", 9, "November", 10, - "December", 11 + "December", 11, + "Jan", 0, + "Feb", 1, + "Mar", 2, + "Apr", 3, + "May", 4, + "Jun", 5, + "Jul", 6, + "Aug", 7, + "Sep", 8, + "Oct", 9, + "Nov", 10, + "Dec", 11 ); $Starttime = (@ARGV[1]) ? &make_time(@ARGV[1]) : 0; @@ -45,6 +57,10 @@ $Tagvalue = @ARGV[2]; while (&get_entry) { $_=$Entry[0]; +# get rid of extra white space + s/\s+/ /g; +# get rid of any time string in date + s/ \d\d:\d\d:\d\d/,/; s/^Date:\s*\w*\s*(\w*)\s*(\w*),\s*(\w*).*/$1 $2 $3/; $Testtime = &make_time($_); $Testtag = &get_tag; -- cgit From fd6ea431617d91c5f5c6b07cb26910f4900c1515 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 3 Sep 2001 08:50:59 +0000 Subject: the next step in our error code handling change - added WERROR for win32 error codes - added a configure test for immediate structures still lots to do, so its not enabled by default, but the main structure is there (This used to be commit 24f9ab683dec52587ee56717e821b49c0fa3d70f) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index a541f2f2b0..200e4243bc 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -126,7 +126,7 @@ END { gotstart = 1; } - if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { + if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { gotstart = 1; } -- cgit From b30e75692d68233448b3ad3d7ddd4b4ac423d3ab Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 10 Sep 2001 11:08:57 +0000 Subject: replaced stdio in many parts of samba with a XFILE. XFILE is a cut-down replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor limit that we hit with nasty consequences on some systems I would eventually prefer us to have a configure test to see if we need to replace stdio, but for now this code needs to be tested widely so I'm enabling it by default. (This used to be commit 1af8bf34f1caa3e7ec312d8109c07d32a945a448) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 200e4243bc..097031590e 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -126,7 +126,7 @@ END { gotstart = 1; } - if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { + if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { gotstart = 1; } -- cgit From 31c44c4744be67159c7b98dc698233572febf083 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 19 Sep 2001 10:45:33 +0000 Subject: Adding the appropirate files might help... (These are part of the build_options patch). Andrew Bartlett (This used to be commit 4e5c7724b4e4c132b7b43104d3063d2f7357bae2) --- source3/script/build_env.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 source3/script/build_env.sh (limited to 'source3/script') diff --git a/source3/script/build_env.sh b/source3/script/build_env.sh new file mode 100755 index 0000000000..8ae79da7b9 --- /dev/null +++ b/source3/script/build_env.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +uname=`uname -a` +date=`date` +srcdir=$1 +builddir=$2 +compiler=$3 + + if [ ! $USER = "" ]; then + whoami=$USER + else + if [ ! $LOGNAME = "" ]; then + whoami=$LOGNAME + else + whoami=`whoai || id -un` + fi + fi + +host=`hostname` + +cat < Date: Wed, 19 Sep 2001 11:44:00 +0000 Subject: typo (This used to be commit 7a47e0fceb8999de93ac9e5721bf65401630dec6) --- source3/script/build_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/build_env.sh b/source3/script/build_env.sh index 8ae79da7b9..b71d12b20a 100755 --- a/source3/script/build_env.sh +++ b/source3/script/build_env.sh @@ -12,7 +12,7 @@ compiler=$3 if [ ! $LOGNAME = "" ]; then whoami=$LOGNAME else - whoami=`whoai || id -un` + whoami=`whoami || id -un` fi fi -- cgit From 14811e7d0ae82b3b8af18838b5be6a61001f8624 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 19 Sep 2001 13:29:33 +0000 Subject: Try to fix up the shell syntax (This used to be commit f57b1085b3a608871f0c1c8fbfe19c121dc8504f) --- source3/script/build_env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/build_env.sh b/source3/script/build_env.sh index b71d12b20a..0000759f16 100755 --- a/source3/script/build_env.sh +++ b/source3/script/build_env.sh @@ -6,10 +6,10 @@ srcdir=$1 builddir=$2 compiler=$3 - if [ ! $USER = "" ]; then + if [ ! "x$USER" = "x" ]; then whoami=$USER else - if [ ! $LOGNAME = "" ]; then + if [ ! "x$LOGNAME" = "x" ]; then whoami=$LOGNAME else whoami=`whoami || id -un` -- cgit From 96db4b1ba3a48f50b80b2cfbf0b940e073b7843c Mon Sep 17 00:00:00 2001 From: Motonobu Takahashi Date: Mon, 24 Sep 2001 15:55:09 +0000 Subject: Added SWAT i18n feature: TO enable configure with --with-i18n-swat to support this gettext is integrated and a new directories name "po" and "intl" are created. now these languages are supported: en - English (default) ja - Japanese po - Polish tr - Turkish To add your language, to create ${your_language}.po by translating source/po/en.po into your language is needed. some of html and image files of various language version are not included yet, though message catalogue files are installed. you need to copy files manually under ${swatdir}/lang/$ln/{help,images,included,using_samba} And also added a option to intall manual pages: of various lang version To enable configure with --with-manlangs but manual pages themself are not included yet. (This used to be commit 486b79a6fc4ba20a751aab544bd0f7ccff2b3d19) --- source3/script/installman.sh | 82 ++++++++++++++++++++++++------------------ source3/script/mkinstalldirs | 40 +++++++++++++++++++++ source3/script/uninstallman.sh | 28 +++++++++------ 3 files changed, 106 insertions(+), 44 deletions(-) create mode 100755 source3/script/mkinstalldirs (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 4eda8fd537..a21385711a 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -1,50 +1,64 @@ #!/bin/sh #5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values +# +# 13 Aug 2001 Rafal Szczesniak +# modified to accomodate international man pages (inspired +# by Japanese edition's approach) MANDIR=$1 SRCDIR=$2/ -if [ $# -ge 3 ] ; then - GROFF=$3 # sh cmd line, including options +langs=$3 + +if [ $# -ge 4 ] ; then + GROFF=$4 # sh cmd line, including options fi -echo Installing man pages in $MANDIR -for d in $MANDIR $MANDIR/man1 $MANDIR/man5 $MANDIR/man7 $MANDIR/man8; do -if [ ! -d $d ]; then -mkdir $d -if [ ! -d $d ]; then - echo Failed to make directory $d, does $USER have privileges? - exit 1 -fi -fi -done +for lang in $langs; do + if ["X$lang" = Xen ]; then + echo Installing default man pages in $MANDIR/ + lang=. + else + echo Installing \"$lang\" man pages in $MANDIR/lang/$lang + fi -for sect in 1 5 7 8 ; do - for m in $MANDIR/man$sect ; do - for s in $SRCDIR../docs/manpages/*$sect; do - FNAME=$m/`basename $s` + langdir=$MANDIR/lang/$lang + for d in $MANDIR $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do + if [ ! -d $d ]; then + mkdir $d + if [ ! -d $d ]; then + echo Failed to make directory $d, does $USER have privileges? + exit 1 + fi + fi + done + + for sect in 1 5 7 8 ; do + for m in $langdir/man$sect ; do + for s in $SRCDIR../docs/manpages/$lang/*$sect; do + FNAME=$m/`basename $s` - # Test for writability. Involves - # blowing away existing files. + # Test for writability. Involves + # blowing away existing files. - if (rm -f $FNAME && touch $FNAME); then - rm $FNAME - if [ "x$GROFF" = x ] ; then - cp $s $m # Copy raw nroff - else - echo "\t$FNAME" # groff'ing can be slow, give the user - # a warm fuzzy. - $GROFF $s > $FNAME # Process nroff, because man(1) (on - # this system) doesn't . - fi - chmod 0644 $FNAME - else - echo Cannot create $FNAME... does $USER have privileges? - fi + if (rm -f $FNAME && touch $FNAME); then + rm $FNAME + if [ "x$GROFF" = x ] ; then + cp $s $m # Copy raw nroff + else + echo "\t$FNAME" # groff'ing can be slow, give the user + # a warm fuzzy. + $GROFF $s > $FNAME # Process nroff, because man(1) (on + # this system) doesn't . + fi + chmod 0644 $FNAME + else + echo Cannot create $FNAME... does $USER have privileges? + fi + done + done done - done done - cat << EOF ====================================================================== The man pages have been installed. You may uninstall them using the command diff --git a/source3/script/mkinstalldirs b/source3/script/mkinstalldirs new file mode 100755 index 0000000000..5020c62554 --- /dev/null +++ b/source3/script/mkinstalldirs @@ -0,0 +1,40 @@ +#! /bin/sh +# mkinstalldirs --- make directory hierarchy +# Author: Noah Friedman +# Created: 1993-05-16 +# Public domain + +# $Id: mkinstalldirs,v 1.1 2001/09/24 15:55:08 monyo Exp $ + +errstatus=0 + +for file +do + set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` + shift + + pathcomp= + for d + do + pathcomp="$pathcomp$d" + case "$pathcomp" in + -* ) pathcomp=./$pathcomp ;; + esac + + if test ! -d "$pathcomp"; then + echo "mkdir $pathcomp" 1>&2 + + mkdir "$pathcomp" || lasterr=$? + + if test ! -d "$pathcomp"; then + errstatus=$lasterr + fi + fi + + pathcomp="$pathcomp/" + done +done + +exit $errstatus + +# mkinstalldirs ends here diff --git a/source3/script/uninstallman.sh b/source3/script/uninstallman.sh index 873ca4f720..3126709831 100755 --- a/source3/script/uninstallman.sh +++ b/source3/script/uninstallman.sh @@ -1,20 +1,28 @@ #!/bin/sh #4 July 96 Dan.Shearer@UniSA.edu.au +# +# 13 Aug 2001 Rafal Szczesniak +# modified to accomodate international man pages (inspired +# by Japanese edition's approach) + MANDIR=$1 SRCDIR=$2 +langs=$3 -echo Uninstalling man pages from $MANDIR +for lang in $langs; do + echo Uninstalling \"$lang\" man pages from $MANDIR/$lang -for sect in 1 5 7 8 ; do - for m in $MANDIR/man$sect ; do - for s in $SRCDIR/../docs/manpages/*$sect; do - FNAME=$m/`basename $s` - if test -f $FNAME; then - echo Deleting $FNAME - rm -f $FNAME - test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges? - fi + for sect in 1 5 7 8 ; do + for m in $MANDIR/$lang/man$sect ; do + for s in $SRCDIR/../docs/manpages/$lang/*$sect; do + FNAME=$m/`basename $s` + if test -f $FNAME; then + echo Deleting $FNAME + rm -f $FNAME + test -f $FNAME && echo Cannot remove $FNAME... does $USER have privileges? + fi + done done done done -- cgit From 14403d5e8acc5ad65ad682186701cca0e5a128c8 Mon Sep 17 00:00:00 2001 From: Motonobu Takahashi Date: Mon, 24 Sep 2001 18:22:46 +0000 Subject: fixed a typo in installman.sh fixed a problem that source/install-sh is not executable (This used to be commit c2e256c18cbaa1145ab6ca8ad59baadca36abbdd) --- source3/script/installman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index a21385711a..1cacbdbc0e 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -15,7 +15,7 @@ fi for lang in $langs; do - if ["X$lang" = Xen ]; then + if [ "X$lang" = Xen ]; then echo Installing default man pages in $MANDIR/ lang=. else -- cgit From f3d8f6b198708c9da9f30ff2a3132b7ead96552c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 25 Sep 2001 02:01:29 +0000 Subject: Try to fix up manpage installation (This used to be commit a302bb20e28ea2e4d04eca34a23ff42e9bc07b05) --- source3/script/installman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 1cacbdbc0e..2329ed5425 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -23,7 +23,7 @@ for lang in $langs; do fi langdir=$MANDIR/lang/$lang - for d in $MANDIR $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do + for d in $MANDIR $MANDIR/lang $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do if [ ! -d $d ]; then mkdir $d if [ ! -d $d ]; then -- cgit From 1817c231c7e67bf836fc1b08fda9b1d8f322f6b8 Mon Sep 17 00:00:00 2001 From: Motonobu Takahashi Date: Tue, 25 Sep 2001 17:40:12 +0000 Subject: now --with-i18n-swat works to install some international files used by SWAT into $swatdir/$ln/{help,images,include} we have still points which needs to discuss, that is how to archive and install lots of HTML help files and Using Samba files. -- monyo (This used to be commit 9ec2d5e96ebb907e66250772057bf5e2601f8ec9) --- source3/script/installswat.sh | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 8868d4cbb1..fce4406b83 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -4,13 +4,26 @@ SWATDIR=$1 SRCDIR=$2/ BOOKDIR=$SWATDIR/using_samba +IS_I18N=$3 echo Installing SWAT in $SWATDIR echo Installing the Samba Web Administration Tool -for d in $SWATDIR $SWATDIR/help $SWATDIR/images $SWATDIR/include; do +if [ X$IS_I18N = Xyes ]; then + LANGS=". `cd $SRCDIR../swat/; /bin/echo lang/??`" + echo Installing langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` +else + LANGS=. +fi + +for ln in $LANGS; do + +SWATLANGDIR=$SWATDIR/$ln + +for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \ + $SWATLANGDIR/include; do if [ ! -d $d ]; then - mkdir $d + mkdir -p $d if [ ! -d $d ]; then echo Failed to make directory $d, does $USER have privileges? exit 1 @@ -18,10 +31,13 @@ for d in $SWATDIR $SWATDIR/help $SWATDIR/images $SWATDIR/include; do fi done +done + # Install images +for ln in $LANGS; do -for f in $SRCDIR../swat/images/*.gif; do - FNAME=$SWATDIR/images/`basename $f` +for f in $SRCDIR../swat/$ln/images/*.gif; do + FNAME=$SWATDIR/$ln/images/`basename $f` echo $FNAME cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? chmod 0644 $FNAME @@ -29,8 +45,8 @@ done # Install html help -for f in $SRCDIR../swat/help/*.html; do - FNAME=$SWATDIR/help/`basename $f` +for f in $SRCDIR../swat/$ln/help/*.html; do + FNAME=$SWATDIR/$ln/help/`basename $f` echo $FNAME if [ "x$BOOKDIR" = "x" ]; then cat $f | sed 's/@BOOKDIR@.*$//' > $f.tmp @@ -54,13 +70,15 @@ done # Install "server-side" includes -for f in $SRCDIR../swat/include/*.html; do - FNAME=$SWATDIR/include/`basename $f` +for f in $SRCDIR../swat/$ln/include/*.html; do + FNAME=$SWATDIR/$ln/include/`basename $f` echo $FNAME cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? chmod 0644 $FNAME done +done + # Install Using Samba book if [ "x$BOOKDIR" != "x" ]; then -- cgit From 18190fc0513d6fa8824fa0b105aeb16dd428106b Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 5 Oct 2001 00:16:04 +0000 Subject: Add CLI_POLICY_HND as a valid return type. (This used to be commit 880201b52b92a430d3f593adf3d55893f7c1c4c4) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 097031590e..72aa4674b4 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -126,7 +126,7 @@ END { gotstart = 1; } - if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { + if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^CLI_POLICY_HND|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { gotstart = 1; } -- cgit From 81f56139b6964ddbe2c03232475f87f474136490 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 11 Oct 2001 07:42:52 +0000 Subject: initial kerberos/ADS/SPNEGO support in libsmb and smbclient. To activate you need to: - install krb5 libraries - run configure - build smbclient - run kinit to get a TGT - run smbclient with the -k option to choose kerberos auth (This used to be commit d33057585644e1337bac743e25ed7653bfb39eef) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 72aa4674b4..c1a9e405b2 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -122,7 +122,7 @@ END { gotstart = 1; } - if( $0 ~ /^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { + if( $0 ~ /^DATA_BLOB|^ASN1_DATA|^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { gotstart = 1; } -- cgit From 59efa068bd3d2f920a40b3333d09a22beb8dedb3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Oct 2001 05:15:31 +0000 Subject: always install swat language files (This used to be commit f283011c284844ef1bdd1f1fc718263904ef5797) --- source3/script/installswat.sh | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index fce4406b83..c66604cdb8 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -4,23 +4,16 @@ SWATDIR=$1 SRCDIR=$2/ BOOKDIR=$SWATDIR/using_samba -IS_I18N=$3 echo Installing SWAT in $SWATDIR echo Installing the Samba Web Administration Tool -if [ X$IS_I18N = Xyes ]; then - LANGS=". `cd $SRCDIR../swat/; /bin/echo lang/??`" - echo Installing langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` -else - LANGS=. -fi +LANGS=". `cd $SRCDIR../swat/; /bin/echo lang/??`" +echo Installing langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` for ln in $LANGS; do - -SWATLANGDIR=$SWATDIR/$ln - -for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \ + SWATLANGDIR=$SWATDIR/$ln + for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \ $SWATLANGDIR/include; do if [ ! -d $d ]; then mkdir -p $d @@ -29,8 +22,7 @@ for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \ exit 1 fi fi -done - + done done # Install images -- cgit From ad2974cd05b4d08c8b92f505bf95aa8e8533235f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 24 Nov 2001 14:16:41 +0000 Subject: added "net join" command this completes the first stage of the smbd ADS support (This used to be commit 058a5aee901e6609969ef7e1d482a720a84a4a12) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index c1a9e405b2..f927d273bd 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -122,7 +122,7 @@ END { gotstart = 1; } - if( $0 ~ /^DATA_BLOB|^ASN1_DATA|^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { + if( $0 ~ /^ADS_STRUCT|^DATA_BLOB|^ASN1_DATA|^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { gotstart = 1; } -- cgit From a062e58d9e47f95ac7c66668b3cfe1f72386f6e0 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 19 Dec 2001 08:44:23 +0000 Subject: - added initial support for trusted domains in winbindd_ads - gss error code patch from a.bokovoy@sam-solutions.net - better sid dumping in ads_dump - fixed help in wbinfo (This used to be commit ee1c3e1f044b4ef62169ad74c5cac40eef81bfda) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index f927d273bd..7c8bc3d6cf 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -122,7 +122,7 @@ END { gotstart = 1; } - if( $0 ~ /^ADS_STRUCT|^DATA_BLOB|^ASN1_DATA|^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { + if( $0 ~ /^ADS_STRUCT|^ADS_RETURN_CODE|^DATA_BLOB|^ASN1_DATA|^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { gotstart = 1; } -- cgit From 1f31ace6cb771d7bf0b64091fba1d24c466ad4e5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 19 Dec 2001 12:21:12 +0000 Subject: much better ADS error handling system (This used to be commit 05a90a28843e0d69183a49a76617c5f32817df16) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 7c8bc3d6cf..36f5b0afd1 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -122,7 +122,7 @@ END { gotstart = 1; } - if( $0 ~ /^ADS_STRUCT|^ADS_RETURN_CODE|^DATA_BLOB|^ASN1_DATA|^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { + if( $0 ~ /^ADS_STRUCT|^ADS_STATUS|^DATA_BLOB|^ASN1_DATA|^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { gotstart = 1; } -- cgit From bb6af711b8f9a525b74198abbe7f1c37014ca6f7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sun, 20 Jan 2002 02:40:05 +0000 Subject: This is the current patch from Luke Leighton to add a degree of seperation betwen reading/writing the raw NamedPipe SMB packets and the matching operations inside smbd's RPC components. This patch is designed for no change in behaviour, and my tests hold that to be true. This patch does however allow for the future loadable modules interface to specify function pointers in replacement of the fixed state. The pipes_struct has been split into two peices, with smb_np_struct taking the information that should be generic to where the data ends up. Some other minor changes are made: we get another small helper function in util_sock.c and some of the original code has better failure debugs and variable use. (As per on-list comments). Andrew Bartlett (This used to be commit 8ef13cabdddf58b741886782297fb64b2fb7e489) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 36f5b0afd1..1d15255a29 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -114,7 +114,7 @@ END { { gotstart = 0; - if( $0 ~ /^const|^connection_struct|^pipes_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) { + if( $0 ~ /^const|^connection_struct|^pipes_struct|^smb_np_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) { gotstart = 1; } -- cgit From b6b6b0c691543fa24442edaabdab3a347a53a6de Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 5 Feb 2002 01:30:50 +0000 Subject: support double functions (This used to be commit e72c6fb36ebd3ea8fc6b6d8e1b1a9ff1ccb3ade9) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 1d15255a29..503ef1e05c 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -114,7 +114,7 @@ END { { gotstart = 0; - if( $0 ~ /^const|^connection_struct|^pipes_struct|^smb_np_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t/ ) { + if( $0 ~ /^const|^connection_struct|^pipes_struct|^smb_np_struct|^file_fd_struct|^files_struct|^connection_struct|^uid_t|^gid_t|^unsigned|^mode_t|^DIR|^user|^int|^pid_t|^ino_t|^off_t|^double/ ) { gotstart = 1; } -- cgit From 6a92f246ca312a25fb453a022bd1f40279cb57b7 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Tue, 12 Feb 2002 18:23:34 +0000 Subject: Add ADS_MODLIST to allowed types (This used to be commit d082d3a9fc2d6eddf82b1583eb1cbfcf5965f1a0) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 503ef1e05c..760a2df727 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -130,7 +130,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST/ ) { gotstart = 1; } -- cgit From 88514f7d1ccab5ef0687414a230cb0474803381f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 18 Feb 2002 22:12:21 +0000 Subject: we definately don't want RCS $id tags in Samba. They make merging much harder. (This used to be commit 6d33b30929e323276e7fc21012983d691a4f8827) --- source3/script/mkinstalldirs | 2 -- 1 file changed, 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkinstalldirs b/source3/script/mkinstalldirs index 5020c62554..f945dbf2bc 100755 --- a/source3/script/mkinstalldirs +++ b/source3/script/mkinstalldirs @@ -4,8 +4,6 @@ # Created: 1993-05-16 # Public domain -# $Id: mkinstalldirs,v 1.1 2001/09/24 15:55:08 monyo Exp $ - errstatus=0 for file -- cgit From 7451e73ae28b91a77520347c73eedf40d5cad2e9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 13 Mar 2002 01:21:02 +0000 Subject: Move the directory creation process outside the 'installbin.sh' script, and into its own. The 'installdirs' makefile entry didn't do anything on my laptop, so it has been replaced with the section from installbin.sh. This also fixes the bug that we ignored the setting of $(PRIVATEDIR) when making the directories. Finally, link pam_winbind with .po objects only, not a mix of .o and .po (as per Don Mccall's request). Andrew Bartlett (This used to be commit c7a883df28da9dd6fb88198df22c4d78bf8acd8b) --- source3/script/installbin.sh | 11 ----------- source3/script/installdirs.sh | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 11 deletions(-) create mode 100755 source3/script/installdirs.sh (limited to 'source3/script') diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh index 77bded6420..c2f34082dd 100755 --- a/source3/script/installbin.sh +++ b/source3/script/installbin.sh @@ -11,17 +11,6 @@ shift shift shift -for d in $BASEDIR $BINDIR $LIBDIR $VARDIR $BASEDIR/private; do -if [ ! -d $d ]; then -mkdir $d -if [ ! -d $d ]; then - echo Failed to make directory $d - exit 1 -fi -fi -done - - for p in $*; do p2=`basename $p` echo Installing $p as $BINDIR/$p2 diff --git a/source3/script/installdirs.sh b/source3/script/installdirs.sh new file mode 100755 index 0000000000..dd8f7cd19c --- /dev/null +++ b/source3/script/installdirs.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +BASEDIR=$1 +SBINDIR=$2 +BINDIR=$3 +LIBDIR=$4 +VARDIR=$5 +PRIVATEDIR=$6 + +for d in $BASEDIR $SBINDIR $BINDIR $LIBDIR $VARDIR $PRIVATEDIR; do +if [ ! -d $d ]; then +mkdir $d +if [ ! -d $d ]; then + echo Failed to make directory $d + exit 1 +fi +fi +done + + -- cgit From 87eb1ffd5577c2cd3f0524da3ff7ffce0b407825 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 21 Mar 2002 23:42:54 +0000 Subject: make install should also install the default dat files from codepages directory so we don't keep getting these stupid error messages about incorrect size for valid.dat upcase.dat and lowcase.dat (This used to be commit 4af0c7a93f626dde33fd737618c2b786f83046c7) --- source3/script/installdat.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 source3/script/installdat.sh (limited to 'source3/script') diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh new file mode 100755 index 0000000000..7ff88ac788 --- /dev/null +++ b/source3/script/installdat.sh @@ -0,0 +1,23 @@ +#!/bin/sh +#fist version March 2002, Herb Lewis + +DATDIR=$1 +SRCDIR=$2/ + +echo Installing dat files in $DATDIR + +for f in $SRCDIR/codepages/*.dat; do + FNAME=$DATDIR/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME +done + +cat << EOF +====================================================================== +The dat files have been installed. +====================================================================== +EOF + +exit 0 + -- cgit From 740b24658c55fc42826704a8fb0f47aeabaffba6 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 28 Mar 2002 03:43:54 +0000 Subject: Use headername when closing off include file guards. (This used to be commit 5bf5bffdd557cec3588e8d7a95b6cf75d00e616f) --- source3/script/mkproto.awk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 760a2df727..1328a42eac 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -8,12 +8,13 @@ BEGIN { print "#ifndef",headername print "#define",headername + print "" print "/* This file is automatically generated with \"make proto\". DO NOT EDIT */" print "" } END { - print "#endif /* _PROTO_H_ */" + print "#endif /* ",headername," */" } { -- cgit From 321767cb6607a87598c10be692ad26a17dd30ab4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 28 Mar 2002 04:12:39 +0000 Subject: Added another return type. (This used to be commit 9b2777d3bcef92b10cdc43a4c1e90beb48382a17) --- source3/script/mkproto.awk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 1328a42eac..9b0aa360bc 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -14,6 +14,7 @@ BEGIN { } END { + print "" print "#endif /* ",headername," */" } @@ -131,7 +132,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject/ ) { gotstart = 1; } -- cgit From dd83af65d743f1e57c93b3788e7ab40553547622 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 9 May 2002 04:12:15 +0000 Subject: merge from SAMBA_2_2 (This used to be commit cc241cb240db6956baf3d5c6b6d01a0a165a6ef5) --- source3/script/findsmb | 145 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100755 source3/script/findsmb (limited to 'source3/script') diff --git a/source3/script/findsmb b/source3/script/findsmb new file mode 100755 index 0000000000..04bc608050 --- /dev/null +++ b/source3/script/findsmb @@ -0,0 +1,145 @@ +#!/usr/bin/perl +# +# Prints info on all smb responding machines on a subnet. +# This script needs to be run on a machine without nmbd running and be +# run as root to get correct info from WIN95 clients. +# +# syntax: +# findsmb [subnet broadcast address] +# +# with no agrument it will list machines on the current subnet +# +# There will be a "+" in front of the workgroup name for machines that are +# local master browsers for that workgroup. There will be an "*" in front +# of the workgroup name for machines that are the domain master browser for +# that workgroup. +# + +$SAMBABIN = "/usr/bin"; + +for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address + $_ = shift; + if (m/-d|-D/) { + $DEBUG = 1; + } else { + if ($_) { + $BCAST = "-B $_"; + } + } +} + +sub ipsort # do numeric sort on last field of IP address +{ + @t1 = split(/\./,$a); + @t2 = split(/\./,$b); + @t1[3] <=> @t2[3]; +} + +# look for all machines that respond to a name lookup + +open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") || + die("Can't run nmblookup '*'.\n"); + +# get rid of all lines that are not a response IP address, +# strip everything but IP address and sort by last field in address + +@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,); + +# print header info + +print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n"; +print "---------------------------------------------------------------------\n"; + +foreach $ip (@ipaddrs) # loop through each IP address found +{ + $ip =~ s/\n//; # strip newline from IP address + +# find the netbios names registered by each machine + + open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") || + die("Can't get nmb name list.\n"); + @nmblookup = ; + close NMBLOOKUP; + +# get the first <00> name + + @name = grep(/<00>/,@nmblookup); + $_ = @name[0]; + if ($_) { # we have a netbios name + if (/GROUP/) { # is it a group name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + } else { +# The Netbios name can contain lot of characters also '<' '>' +# and spaces. The follwing cure inside name space but not +# names starting or ending with spaces + /(.{1,15})\s+<00>\s+/; + $name = $1; + } + +# do an smbclient command on the netbios name. + + open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") || + die("Can't do smbclient command.\n"); + @smb = ; + close SMB; + + if ($DEBUG) { # if -d flag print results of nmblookup and smbclient + print "===============================================================\n"; + print @nmblookup; + print @smb; + } + +# look for the OS= string + + @info = grep(/OS=/,@smb); + $_ = @info[0]; + if ($_) { # we found response + s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter + + } else { # no OS= string in response (WIN95 client) + +# for WIN95 clients get workgroup name from nmblookup response + @name = grep(/<00> - /,@nmblookup); + $_ = @name[0]; + if ($_) { +# Same as before for space and characters + /(.{1,15})\s+<00>\s+/; + $_ = "[$1]"; + } else { + $_ = "Unknown Workgroup"; + } + } + +# see if machine registered a local master browser name + if (grep(/<1d>/,@nmblookup)) { + $master = '+'; # indicate local master browser + if (grep(/<1b>/,@nmblookup)) { # how about domain master browser? + $master = '*'; # indicate domain master browser + } + } else { + $master = ' '; # not a browse master + } + +# line up info in 3 columns + + print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n"; + + } else { # no netbios name found +# try getting the host name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + if ($DEBUG) { # if -d flag print results of nmblookup + print "===============================================================\n"; + print @nmblookup; + } + print "$ip".' 'x(16-length($ip))."$name\n"; + } +} + -- cgit From 3de73897e7083520ac123b399cd823ce61a4d475 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 9 May 2002 13:52:06 +0000 Subject: merge from SAMBA_2_2 (This used to be commit 7382c3013d7b630ba7229a1d12104b8f7edfd9ca) --- source3/script/findsmb | 145 ---------------------------------------------- source3/script/findsmb.in | 145 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 145 insertions(+), 145 deletions(-) delete mode 100755 source3/script/findsmb create mode 100755 source3/script/findsmb.in (limited to 'source3/script') diff --git a/source3/script/findsmb b/source3/script/findsmb deleted file mode 100755 index 04bc608050..0000000000 --- a/source3/script/findsmb +++ /dev/null @@ -1,145 +0,0 @@ -#!/usr/bin/perl -# -# Prints info on all smb responding machines on a subnet. -# This script needs to be run on a machine without nmbd running and be -# run as root to get correct info from WIN95 clients. -# -# syntax: -# findsmb [subnet broadcast address] -# -# with no agrument it will list machines on the current subnet -# -# There will be a "+" in front of the workgroup name for machines that are -# local master browsers for that workgroup. There will be an "*" in front -# of the workgroup name for machines that are the domain master browser for -# that workgroup. -# - -$SAMBABIN = "/usr/bin"; - -for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address - $_ = shift; - if (m/-d|-D/) { - $DEBUG = 1; - } else { - if ($_) { - $BCAST = "-B $_"; - } - } -} - -sub ipsort # do numeric sort on last field of IP address -{ - @t1 = split(/\./,$a); - @t2 = split(/\./,$b); - @t1[3] <=> @t2[3]; -} - -# look for all machines that respond to a name lookup - -open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") || - die("Can't run nmblookup '*'.\n"); - -# get rid of all lines that are not a response IP address, -# strip everything but IP address and sort by last field in address - -@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,); - -# print header info - -print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n"; -print "---------------------------------------------------------------------\n"; - -foreach $ip (@ipaddrs) # loop through each IP address found -{ - $ip =~ s/\n//; # strip newline from IP address - -# find the netbios names registered by each machine - - open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") || - die("Can't get nmb name list.\n"); - @nmblookup = ; - close NMBLOOKUP; - -# get the first <00> name - - @name = grep(/<00>/,@nmblookup); - $_ = @name[0]; - if ($_) { # we have a netbios name - if (/GROUP/) { # is it a group name - ($name, $aliases, $type, $length, @addresses) = - gethostbyaddr(pack('C4',split('\.',$ip)),2); - if (! $name) { # could not get name - $name = "unknown nis name"; - } - } else { -# The Netbios name can contain lot of characters also '<' '>' -# and spaces. The follwing cure inside name space but not -# names starting or ending with spaces - /(.{1,15})\s+<00>\s+/; - $name = $1; - } - -# do an smbclient command on the netbios name. - - open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") || - die("Can't do smbclient command.\n"); - @smb = ; - close SMB; - - if ($DEBUG) { # if -d flag print results of nmblookup and smbclient - print "===============================================================\n"; - print @nmblookup; - print @smb; - } - -# look for the OS= string - - @info = grep(/OS=/,@smb); - $_ = @info[0]; - if ($_) { # we found response - s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter - - } else { # no OS= string in response (WIN95 client) - -# for WIN95 clients get workgroup name from nmblookup response - @name = grep(/<00> - /,@nmblookup); - $_ = @name[0]; - if ($_) { -# Same as before for space and characters - /(.{1,15})\s+<00>\s+/; - $_ = "[$1]"; - } else { - $_ = "Unknown Workgroup"; - } - } - -# see if machine registered a local master browser name - if (grep(/<1d>/,@nmblookup)) { - $master = '+'; # indicate local master browser - if (grep(/<1b>/,@nmblookup)) { # how about domain master browser? - $master = '*'; # indicate domain master browser - } - } else { - $master = ' '; # not a browse master - } - -# line up info in 3 columns - - print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n"; - - } else { # no netbios name found -# try getting the host name - ($name, $aliases, $type, $length, @addresses) = - gethostbyaddr(pack('C4',split('\.',$ip)),2); - if (! $name) { # could not get name - $name = "unknown nis name"; - } - if ($DEBUG) { # if -d flag print results of nmblookup - print "===============================================================\n"; - print @nmblookup; - } - print "$ip".' 'x(16-length($ip))."$name\n"; - } -} - diff --git a/source3/script/findsmb.in b/source3/script/findsmb.in new file mode 100755 index 0000000000..d2aa94591b --- /dev/null +++ b/source3/script/findsmb.in @@ -0,0 +1,145 @@ +#!/usr/bin/perl +# +# Prints info on all smb responding machines on a subnet. +# This script needs to be run on a machine without nmbd running and be +# run as root to get correct info from WIN95 clients. +# +# syntax: +# findsmb [subnet broadcast address] +# +# with no agrument it will list machines on the current subnet +# +# There will be a "+" in front of the workgroup name for machines that are +# local master browsers for that workgroup. There will be an "*" in front +# of the workgroup name for machines that are the domain master browser for +# that workgroup. +# + +$SAMBABIN = "@prefix@/bin"; + +for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address + $_ = shift; + if (m/-d|-D/) { + $DEBUG = 1; + } else { + if ($_) { + $BCAST = "-B $_"; + } + } +} + +sub ipsort # do numeric sort on last field of IP address +{ + @t1 = split(/\./,$a); + @t2 = split(/\./,$b); + @t1[3] <=> @t2[3]; +} + +# look for all machines that respond to a name lookup + +open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") || + die("Can't run nmblookup '*'.\n"); + +# get rid of all lines that are not a response IP address, +# strip everything but IP address and sort by last field in address + +@ipaddrs = sort ipsort grep(s/ \*<00>.*$//,); + +# print header info + +print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n"; +print "---------------------------------------------------------------------\n"; + +foreach $ip (@ipaddrs) # loop through each IP address found +{ + $ip =~ s/\n//; # strip newline from IP address + +# find the netbios names registered by each machine + + open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") || + die("Can't get nmb name list.\n"); + @nmblookup = ; + close NMBLOOKUP; + +# get the first <00> name + + @name = grep(/<00>/,@nmblookup); + $_ = @name[0]; + if ($_) { # we have a netbios name + if (/GROUP/) { # is it a group name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + } else { +# The Netbios name can contain lot of characters also '<' '>' +# and spaces. The follwing cure inside name space but not +# names starting or ending with spaces + /(.{1,15})\s+<00>\s+/; + $name = $1; + } + +# do an smbclient command on the netbios name. + + open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") || + die("Can't do smbclient command.\n"); + @smb = ; + close SMB; + + if ($DEBUG) { # if -d flag print results of nmblookup and smbclient + print "===============================================================\n"; + print @nmblookup; + print @smb; + } + +# look for the OS= string + + @info = grep(/OS=/,@smb); + $_ = @info[0]; + if ($_) { # we found response + s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter + + } else { # no OS= string in response (WIN95 client) + +# for WIN95 clients get workgroup name from nmblookup response + @name = grep(/<00> - /,@nmblookup); + $_ = @name[0]; + if ($_) { +# Same as before for space and characters + /(.{1,15})\s+<00>\s+/; + $_ = "[$1]"; + } else { + $_ = "Unknown Workgroup"; + } + } + +# see if machine registered a local master browser name + if (grep(/<1d>/,@nmblookup)) { + $master = '+'; # indicate local master browser + if (grep(/<1b>/,@nmblookup)) { # how about domain master browser? + $master = '*'; # indicate domain master browser + } + } else { + $master = ' '; # not a browse master + } + +# line up info in 3 columns + + print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n"; + + } else { # no netbios name found +# try getting the host name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + if ($DEBUG) { # if -d flag print results of nmblookup + print "===============================================================\n"; + print @nmblookup; + } + print "$ip".' 'x(16-length($ip))."$name\n"; + } +} + -- cgit From 0502d0ad6b5258dcd2aa84bf969f21592ce52e6f Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 10 May 2002 03:17:44 +0000 Subject: Added findsmb to .cvsignore list. (This used to be commit 5b682b2e04d054a2843269373abddc764c4c0cdd) --- source3/script/.cvsignore | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/script') diff --git a/source3/script/.cvsignore b/source3/script/.cvsignore index e69de29bb2..7a8114ecd7 100644 --- a/source3/script/.cvsignore +++ b/source3/script/.cvsignore @@ -0,0 +1 @@ +findsmb -- cgit From 58e1fe62cc955c6b8449332447a6879c6fab64e7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 18 May 2002 05:52:52 +0000 Subject: A few things in this commit: cleanup some of the code in net_rpc_join re const warnings and fstrings. Passdb: Make the %u and %U substituions in passdb work. This is done by declaring these paramters to be 'const' and doing the substitution manually. I'm told this is us going full circle, but I can't really see a better way. Finally these things actually seem to work properly... Make the lanman code use the pdb's recorded values for homedir etc rather than the values from lp_*() Add code to set the plaintext password in the passdb, where it can decide how to store/set it. For use with a future 'ldap password change' option, or somthing like that... Add pdb_unix, so as to remove the 'not in passdb' special cases from the local_lookup_*() code. Quite small, as it uses the new 'struct passwd -> SAM_ACCOUNT' code that is now in just one place. (also used by pdb_smbpasswd) Other: Fix up the adding of [homes] at session setup time to actually pass the right string, that is the unix homedir, not the UNC path. Fix up [homes] so that for winbind users is picks the correct name. (bad interactions with the default domain code previously) Change the rpc_server/srv_lsa_nt.c code to match NT when for the SATUS_NONE_MAPPED reply: This was only being triggered on no queries, now it is on the 'no mappings' (ie all mappings failed). Checked against Win2k. Policy Question: Should SID -> unix_user.234/unix_group.364 be considered a mapping or not? Currently it isn't. Andrew Bartlett (This used to be commit c28668068b5a3b3cf3c4317e5fb32ec9957f3e34) --- source3/script/mkproto.awk | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 9b0aa360bc..c701ed41cd 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -72,6 +72,11 @@ END { printf "char *%s(int );\n", a[2] } +/^FN_LOCAL_CONST_STRING/ { + split($0,a,"[,()]") + printf "const char *%s(int );\n", a[2] +} + /^FN_LOCAL_INT/ { split($0,a,"[,()]") printf "int %s(int );\n", a[2] @@ -97,6 +102,11 @@ END { printf "char *%s(void);\n", a[2] } +/^FN_GLOBAL_CONST_STRING/ { + split($0,a,"[,()]") + printf "const char *%s(void);\n", a[2] +} + /^FN_GLOBAL_INT/ { split($0,a,"[,()]") printf "int %s(void);\n", a[2] -- cgit From 2154ebce84c6cf376e7183e8c5f7ad0e17aead97 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 13 Jun 2002 07:06:19 +0000 Subject: a useful script for finding global variables or functions that could be static very very slow ... I leave it as an exercise for the reader to make this O(n) instead of O(n^2) (This used to be commit 7c035d473c7175163ad5db0373ed2fe6c739b968) --- source3/script/findstatic.sh | 59 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100755 source3/script/findstatic.sh (limited to 'source3/script') diff --git a/source3/script/findstatic.sh b/source3/script/findstatic.sh new file mode 100755 index 0000000000..39c57a46f7 --- /dev/null +++ b/source3/script/findstatic.sh @@ -0,0 +1,59 @@ +#!/bin/sh +# find a list of fns and variables in the code that could be static +# Andrew Tridgell + +# rather linux specific, but that doesn't matter in this case +# also very slow (order is N^2) but fast enough for this project + +declare -a FNS + +for f in $@; do + echo "Checking in $f" + T_FNS=`nm $f | grep ' T ' | cut -d' ' -f3` + C_FNS=`nm $f | egrep ' [DC] ' | cut -d' ' -f3` + if [ "$T_FNS" = "" -a "$C_FNS" = "" ]; then + echo "No public functions or data in $f" + continue + fi + for fn in $T_FNS; do + if [ $fn = "main" ]; then + continue + fi + found=0 + for f2 in $@; do + if [ $f != $f2 ]; then + FNS2=`nm $f2 | egrep ' U ' | awk '{print $2}'` + for fn2 in $FNS2; do + if [ $fn2 = $fn ]; then + found=1 + break + fi + done + fi + done + if [ $found = 0 ]; then + echo "Global function $fn is unique to $f" + fi + done + + for fn in $C_FNS; do + if [ $fn = "main" ]; then + continue + fi + found=0 + for f2 in $@; do + if [ $f != $f2 ]; then + FNS2=`nm $f2 | grep ' U ' | awk '{print $2}'` + for fn2 in $FNS2; do + if [ $fn2 = $fn ]; then + found=1 + break + fi + done + fi + done + if [ $found = 0 ]; then + echo "Global variable $fn is unique to $f" + fi + done +done -- cgit From fe082a8ff518a5e5ce574e6da40c3c05aed99947 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 24 Jun 2002 06:27:30 +0000 Subject: much better findstatic script (This used to be commit 2947b7624f921032bcd2cc5507747b2f7ef190de) --- source3/script/findstatic.pl | 65 ++++++++++++++++++++++++++++++++++++++++++++ source3/script/findstatic.sh | 59 ---------------------------------------- 2 files changed, 65 insertions(+), 59 deletions(-) create mode 100755 source3/script/findstatic.pl delete mode 100755 source3/script/findstatic.sh (limited to 'source3/script') diff --git a/source3/script/findstatic.pl b/source3/script/findstatic.pl new file mode 100755 index 0000000000..d2d1b4d924 --- /dev/null +++ b/source3/script/findstatic.pl @@ -0,0 +1,65 @@ +#!/usr/bin/perl -w +# find a list of fns and variables in the code that could be static +# usually called with something like this: +# findstatic.pl `find . -name "*.o"` +# Andrew Tridgell + +use strict; + +# use nm to find the symbols +my($saved_delim) = $/; +undef $/; +my($syms) = `nm -o @ARGV`; +$/ = $saved_delim; + +my(@lines) = split(/\n/s, $syms); + +my(%def); +my(%undef); +my(%stype); + +my(%typemap) = ( + "T" => "function", + "C" => "uninitialised variable", + "D" => "initialised variable" + ); + + +# parse the symbols into defined and undefined +for (my($i)=0; $i <= $#{@lines}; $i++) { + my($line) = $lines[$i]; + if ($line =~ /(.*):[a-f0-9]* ([TCD]) (.*)/) { + my($fname) = $1; + my($symbol) = $3; + push(@{$def{$fname}}, $symbol); + $stype{$symbol} = $2; + } + if ($line =~ /(.*):\s* U (.*)/) { + my($fname) = $1; + my($symbol) = $2; + push(@{$undef{$fname}}, $symbol); + } +} + +# look for defined symbols that are never referenced outside the place they +# are defined +foreach my $f (keys %def) { + print "Checking $f\n"; + foreach my $s (@{$def{$f}}) { + my($found) = 0; + foreach my $f2 (keys %undef) { + if ($f2 ne $f) { + foreach my $s2 (@{$undef{$f2}}) { + if ($s2 eq $s) { + $found = 1; + } + } + } + } + if ($found == 0) { + my($t) = $typemap{$stype{$s}}; + print " '$s' is unique to $f ($t)\n"; + } + } +} + diff --git a/source3/script/findstatic.sh b/source3/script/findstatic.sh deleted file mode 100755 index 39c57a46f7..0000000000 --- a/source3/script/findstatic.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/sh -# find a list of fns and variables in the code that could be static -# Andrew Tridgell - -# rather linux specific, but that doesn't matter in this case -# also very slow (order is N^2) but fast enough for this project - -declare -a FNS - -for f in $@; do - echo "Checking in $f" - T_FNS=`nm $f | grep ' T ' | cut -d' ' -f3` - C_FNS=`nm $f | egrep ' [DC] ' | cut -d' ' -f3` - if [ "$T_FNS" = "" -a "$C_FNS" = "" ]; then - echo "No public functions or data in $f" - continue - fi - for fn in $T_FNS; do - if [ $fn = "main" ]; then - continue - fi - found=0 - for f2 in $@; do - if [ $f != $f2 ]; then - FNS2=`nm $f2 | egrep ' U ' | awk '{print $2}'` - for fn2 in $FNS2; do - if [ $fn2 = $fn ]; then - found=1 - break - fi - done - fi - done - if [ $found = 0 ]; then - echo "Global function $fn is unique to $f" - fi - done - - for fn in $C_FNS; do - if [ $fn = "main" ]; then - continue - fi - found=0 - for f2 in $@; do - if [ $f != $f2 ]; then - FNS2=`nm $f2 | grep ' U ' | awk '{print $2}'` - for fn2 in $FNS2; do - if [ $fn2 = $fn ]; then - found=1 - break - fi - done - fi - done - if [ $found = 0 ]; then - echo "Global variable $fn is unique to $f" - fi - done -done -- cgit From 9930b0b0650ae3e38c033c28672398425dd8228c Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 1 Jul 2002 09:12:41 +0000 Subject: used findstatic.pl to make some variables static and remove some dead code (This used to be commit 91ad9041e9507d36eb3f40c23c5d4df61f139ef0) --- source3/script/findstatic.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/script') diff --git a/source3/script/findstatic.pl b/source3/script/findstatic.pl index d2d1b4d924..43a4916435 100755 --- a/source3/script/findstatic.pl +++ b/source3/script/findstatic.pl @@ -45,6 +45,7 @@ for (my($i)=0; $i <= $#{@lines}; $i++) { # are defined foreach my $f (keys %def) { print "Checking $f\n"; + my($found_one) = 0; foreach my $s (@{$def{$f}}) { my($found) = 0; foreach my $f2 (keys %undef) { @@ -52,6 +53,7 @@ foreach my $f (keys %def) { foreach my $s2 (@{$undef{$f2}}) { if ($s2 eq $s) { $found = 1; + $found_one = 1; } } } @@ -61,5 +63,8 @@ foreach my $f (keys %def) { print " '$s' is unique to $f ($t)\n"; } } + if ($found_one == 0) { + print " all symbols in '$f' are unused (main program?)\n"; + } } -- cgit From 06ae9ac5d98a752d8ca17686a4a3b1786fbe520d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 18 Jul 2002 23:00:24 +0000 Subject: virtual registry framework with initial printing hooks. (This used to be commit a43d9788fa8823d678ee72470421b980165ec2b0) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index c701ed41cd..eef7180e72 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -142,7 +142,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK/ ) { gotstart = 1; } -- cgit From 6dd9f24d05e5db92e15dc53399a0f78ccb69f718 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 20 Jul 2002 13:23:57 +0000 Subject: another intermediate checkin on the way to enumerating forms via the registry. There is a seg fault here which shouldn't bother anyone until I can get it fixed. I just need a check point in case I need to roll back to this version later on. (This used to be commit e62ae94823461e142978a786b2860ea97906cfb3) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index eef7180e72..b71d50e95a 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -142,7 +142,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE/ ) { gotstart = 1; } -- cgit From a12ed7f506263c6ec34c7df6bbcb3e8434841403 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 24 Jul 2002 08:58:03 +0000 Subject: done! printer_info_2, devicemode, sec_desc, & printer data all enumerate and display correctly in regedit.exe. Not sure about REG_SZ values in PrinterDriverData. If we store these in UNICODE, I'll have to fix up a few things. REG_BINARY & REG_DWORD are fine. (This used to be commit 2a30c243ec28734bbc721dfc01b743faa6f73788) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index b71d50e95a..196715d6b1 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -142,7 +142,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^DEVICEMODE/ ) { gotstart = 1; } -- cgit From 03e9a50305ed14e580c26cbe1fb53d3f7784e9da Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Jul 2002 05:57:23 +0000 Subject: fixed man install samba-patches 961 (This used to be commit 935996e1c7e742da5961e0eaaf4b3cf5a40b9547) --- source3/script/installman.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 2329ed5425..5b6bba69ed 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -22,8 +22,8 @@ for lang in $langs; do echo Installing \"$lang\" man pages in $MANDIR/lang/$lang fi - langdir=$MANDIR/lang/$lang - for d in $MANDIR $MANDIR/lang $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do + langdir=$MANDIR/$lang + for d in $MANDIR $langdir $langdir/man1 $langdir/man5 $langdir/man7 $langdir/man8; do if [ ! -d $d ]; then mkdir $d if [ ! -d $d ]; then -- cgit From c74a8d72f9875ea34886cca6baa8a1cb3c7ad301 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 29 Jul 2002 03:26:31 +0000 Subject: Merge from APPLIANCE_HEAD: >When creating an automatically generated prototype make sure the >destination directory exists. (This used to be commit 9ffca4824c9fa76ab288f59b4b57a3cdc99a93b8) --- source3/script/mkproto.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.sh b/source3/script/mkproto.sh index 4dbe4c204e..2bf96c9b41 100755 --- a/source3/script/mkproto.sh +++ b/source3/script/mkproto.sh @@ -29,6 +29,8 @@ proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep - echo creating $header +mkdir -p `dirname $header` + ${awk} $headeropt \ -f script/mkproto.awk $proto_src > $headertmp -- cgit From ea27af285a3d32101bdc52ff4a8ff9cdebd4b256 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 29 Jul 2002 16:22:37 +0000 Subject: simple perl script for retreiving cvs log messages for a file after a given date. I use it to help update the WHATSNEW.txt for a release. ./cvslog.pl SAMBA_2_2 '>2002-06-18' configure.in The output is a little messy right now, but I plan to clean that up. (This used to be commit 8812223e2a37b0d0f143fcc74c6ba85ac8081ffb) --- source3/script/cvslog.pl | 102 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100755 source3/script/cvslog.pl (limited to 'source3/script') diff --git a/source3/script/cvslog.pl b/source3/script/cvslog.pl new file mode 100755 index 0000000000..f3d020aa72 --- /dev/null +++ b/source3/script/cvslog.pl @@ -0,0 +1,102 @@ +#!/usr/bin/perl -w + +my ( $tag, $filename, $date ); +my ( $tmp, $change_flag ); + +if ( $#ARGV != 2 ) { + + print "Usage: ", $0, " cvstag date file\n"; + exit 1; +} + +$tag = $ARGV[0]; +$date = $ARGV[1]; +$filename = $ARGV[2]; + +print STDERR "$filename\n"; + +open ( CVSLOG, "cvs log -d\"$date\" $filename |" ) || die $!; + +## +## First get the branch revision number +## +undef $revision; +while ( !defined($revision) ) { + if ( eof( \*CVSLOG ) ) { + print STDERR "Premature end of cvs log output!\n"; + exit (1); + } + + $string = ; + chomp( $string ); + + if ( $string =~ /$tag:/ ) { + ( $tmp, $revision ) = split( /:/, $string ); + $revision =~ s/\s+//g; + $revision =~ s/\.0\./\./g; + } +} + +## +## Setup the beginning of the first record +## +$string = ""; +while ( $string !~ /^-+/ ) { + $string = ; + exit(0) if ( eof(\*CVSLOG) ); +} + +## +## Loop starting at the revision number for the entry +## + +while ( $string = ) { + + ($tmp, $entry_rev) = split( /\s+/, $string ); + if ( equal_revision( $revision, $entry_rev ) ) { + if ( ! defined($change_flag) ) { + print "++++++++++++++++++++++++++++++++++++++++++++++++++\n"; + print "## $filename\n"; + print "++\n"; + $change_flag = 1; + } + + while ( $string !~ /^-+/ && !eof(CVSLOG) ) { + print "$string"; + $string = ; + } + } + else { + while ( ($string !~ /^-+/) && !eof(CVSLOG) ) { + $string = ; + } + } +} + +close( CVSLOG ); +exit 0; + +############################################################## +## +sub equal_revision { + my ( $branch, $newfile ) = @_; + my ( $indx ); + my ( @branch_rev, @file_rev ); + + @branch_rev = split( /\./, $branch ); + @file_rev = split( /\./, $newfile ); + + return 0 if ( $#branch_rev != ($#file_rev - 1) ); + + $indx = 0; + while( $indx <= $#branch_rev ) { + if ( $branch_rev[$indx] != $file_rev[$indx] ) { + return 0; + } + $indx++; + } + + return 1; +} + + -- cgit From 4c8b313a2378b1c1e7f46d7bf79542eedb20ff25 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 19 Aug 2002 14:55:06 +0000 Subject: Add script to find undocumented smb.conf options (This used to be commit 77152b4033f13abcdb86c7835f3112fa422a420d) --- source3/script/find_missing_doc.pl | 43 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100755 source3/script/find_missing_doc.pl (limited to 'source3/script') diff --git a/source3/script/find_missing_doc.pl b/source3/script/find_missing_doc.pl new file mode 100755 index 0000000000..4d22e20a29 --- /dev/null +++ b/source3/script/find_missing_doc.pl @@ -0,0 +1,43 @@ +#!/usr/bin/perl -w + +#reads in the list of parameters from the source +#compares this list to the list of parms documented in the docbook source +#prints out the names of the parameters that are in need of documentation +# (C) 2002 Bradley W. Langhorst" + +my $doc_file = "./docs/docbook/manpages/smb.conf.5.sgml"; +my $source_file = "./source/param/loadparm.c"; +my $ln; +my %params; + +open(SOURCE, "<$source_file") || + die "Unable to open $source_file for input: $!\n"; +open(DOC, "<$doc_file") || + die "Unable to open $doc_file for input: $!\n"; + +while ($ln= ) { + last if $ln =~ m/^static\ struct\ parm_struct\ parm_table.*/; +} #burn through the preceding lines + +while ($ln = ) { + last if $ln =~ m/^\s*\}\;\s*$/; + #pull in the param names only + next if $ln =~ m/.*P_SEPARATOR.*/; + $ln =~ m/.*\"(.*)\".*/; + $params{lc($1)}='not_found'; #not case sensitive +} +close SOURCE; +#now read in the params list from the docs +@doclines = ; + +foreach $ln (grep (/\\s*(?:\<.*?\>)*\s*(.*?)(?:\s*\(?[S,G]?\)?\s*(\<\/term\>)?){1}\s*$/; + #print "got: $1 from: $ln"; + if (exists $params{lc($1)}) { + $params{$1} = 'found'; + } +} + +foreach (keys %params) { + print "$_\n" if $params{$_} eq 'not_found'; +} -- cgit From 1ceb135b6c70272518f3d3ee54a651e204085e4c Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 20 Aug 2002 17:57:07 +0000 Subject: Don't report missing "-valid" (This used to be commit f9018f4560c205033d25e6294534be4b7a79f6c1) --- source3/script/find_missing_doc.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/find_missing_doc.pl b/source3/script/find_missing_doc.pl index 4d22e20a29..89385baaa2 100755 --- a/source3/script/find_missing_doc.pl +++ b/source3/script/find_missing_doc.pl @@ -39,5 +39,5 @@ foreach $ln (grep (/\ Date: Fri, 27 Sep 2002 09:47:02 +0000 Subject: An example of a group creation command that can handle failures of groupadd. Volker (This used to be commit 3f78923a6feefffae6203d27a765b2a8cf3c5c24) --- source3/script/creategroup | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 source3/script/creategroup (limited to 'source3/script') diff --git a/source3/script/creategroup b/source3/script/creategroup new file mode 100755 index 0000000000..01fb065944 --- /dev/null +++ b/source3/script/creategroup @@ -0,0 +1,27 @@ +#!/bin/sh + +# Example script for 'add group command'. Handle weird NT group +# names. First attempt to create the group directly, if that fails +# then create a random group and print the numeric group id. +# +# Note that this is only an example and assumes /dev/urandom. +# +# Volker + +GROUPNAME="$1" +ITERS=0 + +while ! /usr/sbin/groupadd "$GROUPNAME" > /dev/null 2>&1 +do + # we had difficulties creating that group. Maybe the name was + # too weird, or it already existed. Create a random name. + GROUPNAME=nt-$(dd if=/dev/urandom bs=16 count=1 2>/dev/null | md5sum | cut -b 1-5) + ITERS=$(expr "$ITERS" + 1) + if [ "$ITERS" -gt 10 ] + then + # Too many attempts + exit 1 + fi +done + +getent group | grep ^"$GROUPNAME": | cut -d : -f 3 -- cgit From f15c47d24da4eccb6fd32f4a2b00b198ca67c72d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Oct 2002 18:36:38 +0000 Subject: Update find_missing_doc.pl: - Report references in smb.conf that point to non-existent entries - Report entries that are not referenced in the list - Report entries that are documented, but don't exist in loadparm.c - Report entries that are in loadparm.c, but are not documented (This used to be commit bf5a84efb36410bc07e7de91f4a926a60083bb7a) --- source3/script/find_missing_doc.pl | 105 +++++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 27 deletions(-) (limited to 'source3/script') diff --git a/source3/script/find_missing_doc.pl b/source3/script/find_missing_doc.pl index 89385baaa2..8412836e7d 100755 --- a/source3/script/find_missing_doc.pl +++ b/source3/script/find_missing_doc.pl @@ -1,21 +1,65 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -#reads in the list of parameters from the source -#compares this list to the list of parms documented in the docbook source -#prints out the names of the parameters that are in need of documentation -# (C) 2002 Bradley W. Langhorst" +my $doc_file = "/docs/docbook/manpages/smb.conf.5.sgml"; +my $source_file = "/source/param/loadparm.c"; -my $doc_file = "./docs/docbook/manpages/smb.conf.5.sgml"; -my $source_file = "./source/param/loadparm.c"; -my $ln; -my %params; +my %link,%doc,%param; -open(SOURCE, "<$source_file") || - die "Unable to open $source_file for input: $!\n"; -open(DOC, "<$doc_file") || - die "Unable to open $doc_file for input: $!\n"; +# This one shouldn't be documented at all +$doc{-valid} = "FOUND"; -while ($ln= ) { +$topdir = (shift @ARGV) or $topdir = "."; + +################################################## + +print "Reading links from manpage\n"; + +open(IN,$topdir.$doc_file); + +while() { + if( /([^<]*)<\/parameter><\/link><\/para><\/listitem>/g ){ + $link{$2} = $1; + $ref{$1} = $2; + } +} + +close(IN); + +################################################## + +print "Reading documentation from manpage\n"; + +open(IN,$topdir.$doc_file) || die("Can't open $topdir$doc_file"); + +while() { + if( /([^<]*?)([ ]*)\(.\)([ ]*)<\/term>/g ) { + $key = $1; + $value = $2; + $doc{$value} = $key; + + # There is a reference to this entry + if($ref{$key} eq $value){ + $ref{$key} = "FOUND"; + } else { + if($ref{$key}) { + print "$key should refer to $value, but refers to " . $ref{$key} . "\n"; + } else { + print "$key should refer to $value, but has no reference!\n"; + } + $ref{$key} = $value; + } + } +} + +close(IN); + +################################################# + +print "Reading entries from source code\n"; + +open(SOURCE,$topdir.$source_file) || die("Can't open $topdir$source_file"); + +while ($ln = ) { last if $ln =~ m/^static\ struct\ parm_struct\ parm_table.*/; } #burn through the preceding lines @@ -23,21 +67,28 @@ while ($ln = ) { last if $ln =~ m/^\s*\}\;\s*$/; #pull in the param names only next if $ln =~ m/.*P_SEPARATOR.*/; - $ln =~ m/.*\"(.*)\".*/; - $params{lc($1)}='not_found'; #not case sensitive + next unless $ln =~ /.*\"(.*)\".*/; + + if($doc{lc($1)}) { + $doc{lc($1)} = "FOUND"; + } else { + print "$1 is not documented!\n"; + } } close SOURCE; -#now read in the params list from the docs -@doclines = ; - -foreach $ln (grep (/\\s*(?:\<.*?\>)*\s*(.*?)(?:\s*\(?[S,G]?\)?\s*(\<\/term\>)?){1}\s*$/; - #print "got: $1 from: $ln"; - if (exists $params{lc($1)}) { - $params{$1} = 'found'; - } + +################################################## + +print "Trying to find missing references\n"; + +foreach (keys %ref) { + if($ref{$_} cmp "FOUND") { + print "$_ references to " . $ref{$_} . ", but " . $ref{$_} . " isn't an anchor!\n"; + } } -foreach (keys %params) { - print "$_\n" if $params{$_} eq 'not_found' and $_ cmp "valid" and $_ eq ""; +foreach (keys %doc) { + if($doc{$_} cmp "FOUND") { + print "$_ is documented but is not a configuration option!\n"; + } } -- cgit From 5b29a8f6efdde3d924f38e5fef7ec39019ec0463 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Oct 2002 18:38:04 +0000 Subject: Be less verbose (This used to be commit 65c4a1060b57b1fa18f125d7ef92eb2cec0e1edf) --- source3/script/find_missing_doc.pl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'source3/script') diff --git a/source3/script/find_missing_doc.pl b/source3/script/find_missing_doc.pl index 8412836e7d..b582446569 100755 --- a/source3/script/find_missing_doc.pl +++ b/source3/script/find_missing_doc.pl @@ -11,8 +11,7 @@ $doc{-valid} = "FOUND"; $topdir = (shift @ARGV) or $topdir = "."; ################################################## - -print "Reading links from manpage\n"; +# Reading links from manpage open(IN,$topdir.$doc_file); @@ -26,8 +25,7 @@ while() { close(IN); ################################################## - -print "Reading documentation from manpage\n"; +# Reading documentation from manpage open(IN,$topdir.$doc_file) || die("Can't open $topdir$doc_file"); @@ -54,8 +52,7 @@ while() { close(IN); ################################################# - -print "Reading entries from source code\n"; +# Reading entries from source code open(SOURCE,$topdir.$source_file) || die("Can't open $topdir$source_file"); @@ -78,8 +75,7 @@ while ($ln = ) { close SOURCE; ################################################## - -print "Trying to find missing references\n"; +# Trying to find missing references foreach (keys %ref) { if($ref{$_} cmp "FOUND") { -- cgit From 66d95b8f4574998dd1c9fd48b3982b1d270e5c45 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 28 Oct 2002 19:37:02 +0000 Subject: Sync with HEAD (This used to be commit a3d9fd65eb64ecd575fd07d0279c139093417c96) --- source3/script/find_missing_doc.pl | 101 +++++++++++++++++++++++++++---------- 1 file changed, 74 insertions(+), 27 deletions(-) (limited to 'source3/script') diff --git a/source3/script/find_missing_doc.pl b/source3/script/find_missing_doc.pl index 89385baaa2..b582446569 100755 --- a/source3/script/find_missing_doc.pl +++ b/source3/script/find_missing_doc.pl @@ -1,21 +1,62 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl -#reads in the list of parameters from the source -#compares this list to the list of parms documented in the docbook source -#prints out the names of the parameters that are in need of documentation -# (C) 2002 Bradley W. Langhorst" +my $doc_file = "/docs/docbook/manpages/smb.conf.5.sgml"; +my $source_file = "/source/param/loadparm.c"; -my $doc_file = "./docs/docbook/manpages/smb.conf.5.sgml"; -my $source_file = "./source/param/loadparm.c"; -my $ln; -my %params; +my %link,%doc,%param; -open(SOURCE, "<$source_file") || - die "Unable to open $source_file for input: $!\n"; -open(DOC, "<$doc_file") || - die "Unable to open $doc_file for input: $!\n"; +# This one shouldn't be documented at all +$doc{-valid} = "FOUND"; -while ($ln= ) { +$topdir = (shift @ARGV) or $topdir = "."; + +################################################## +# Reading links from manpage + +open(IN,$topdir.$doc_file); + +while() { + if( /([^<]*)<\/parameter><\/link><\/para><\/listitem>/g ){ + $link{$2} = $1; + $ref{$1} = $2; + } +} + +close(IN); + +################################################## +# Reading documentation from manpage + +open(IN,$topdir.$doc_file) || die("Can't open $topdir$doc_file"); + +while() { + if( /([^<]*?)([ ]*)\(.\)([ ]*)<\/term>/g ) { + $key = $1; + $value = $2; + $doc{$value} = $key; + + # There is a reference to this entry + if($ref{$key} eq $value){ + $ref{$key} = "FOUND"; + } else { + if($ref{$key}) { + print "$key should refer to $value, but refers to " . $ref{$key} . "\n"; + } else { + print "$key should refer to $value, but has no reference!\n"; + } + $ref{$key} = $value; + } + } +} + +close(IN); + +################################################# +# Reading entries from source code + +open(SOURCE,$topdir.$source_file) || die("Can't open $topdir$source_file"); + +while ($ln = ) { last if $ln =~ m/^static\ struct\ parm_struct\ parm_table.*/; } #burn through the preceding lines @@ -23,21 +64,27 @@ while ($ln = ) { last if $ln =~ m/^\s*\}\;\s*$/; #pull in the param names only next if $ln =~ m/.*P_SEPARATOR.*/; - $ln =~ m/.*\"(.*)\".*/; - $params{lc($1)}='not_found'; #not case sensitive + next unless $ln =~ /.*\"(.*)\".*/; + + if($doc{lc($1)}) { + $doc{lc($1)} = "FOUND"; + } else { + print "$1 is not documented!\n"; + } } close SOURCE; -#now read in the params list from the docs -@doclines = ; - -foreach $ln (grep (/\\s*(?:\<.*?\>)*\s*(.*?)(?:\s*\(?[S,G]?\)?\s*(\<\/term\>)?){1}\s*$/; - #print "got: $1 from: $ln"; - if (exists $params{lc($1)}) { - $params{$1} = 'found'; - } + +################################################## +# Trying to find missing references + +foreach (keys %ref) { + if($ref{$_} cmp "FOUND") { + print "$_ references to " . $ref{$_} . ", but " . $ref{$_} . " isn't an anchor!\n"; + } } -foreach (keys %params) { - print "$_\n" if $params{$_} eq 'not_found' and $_ cmp "valid" and $_ eq ""; +foreach (keys %doc) { + if($doc{$_} cmp "FOUND") { + print "$_ is documented but is not a configuration option!\n"; + } } -- cgit From 250c9801197ea1c949bd94c1c891f81ab118b130 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Nov 2002 23:15:52 +0000 Subject: Removed global_myworkgroup, global_myname, global_myscope. Added liberal dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit 82b8f749a36b42e22186297482aad2abb04fab8a) --- source3/script/mkproto.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 196715d6b1..9acdf374f1 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -64,7 +64,7 @@ END { /^FN_LOCAL_LIST/ { split($0,a,"[,()]") - printf "char **%s(int );\n", a[2] + printf "const char **%s(int );\n", a[2] } /^FN_LOCAL_STRING/ { @@ -94,7 +94,7 @@ END { /^FN_GLOBAL_LIST/ { split($0,a,"[,()]") - printf "char **%s(void);\n", a[2] + printf "const char **%s(void);\n", a[2] } /^FN_GLOBAL_STRING/ { -- cgit From 2f194322d419350f35a48dff750066894d68eccf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 12 Nov 2002 23:20:50 +0000 Subject: Removed global_myworkgroup, global_myname, global_myscope. Added liberal dashes of const. This is a rather large check-in, some things may break. It does compile though :-). Jeremy. (This used to be commit f755711df8f74f9b8e8c1a2b0d07d02a931eeb89) --- source3/script/mkproto.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 196715d6b1..9acdf374f1 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -64,7 +64,7 @@ END { /^FN_LOCAL_LIST/ { split($0,a,"[,()]") - printf "char **%s(int );\n", a[2] + printf "const char **%s(int );\n", a[2] } /^FN_LOCAL_STRING/ { @@ -94,7 +94,7 @@ END { /^FN_GLOBAL_LIST/ { split($0,a,"[,()]") - printf "char **%s(void);\n", a[2] + printf "const char **%s(void);\n", a[2] } /^FN_GLOBAL_STRING/ { -- cgit From 97bec3fc3e676e088ea78ba81ea02cb4f9434edb Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 13 Nov 2002 20:38:56 +0000 Subject: Remove obsolete scripts and put in module install/uninstall (This used to be commit d777bba5082ebdf78d314b0d7b4196a4d6413e1f) --- source3/script/installcp.sh | 44 ------------------ source3/script/installmodules.sh | 26 +++++++++++ source3/script/makeyodldocs.sh | 92 -------------------------------------- source3/script/uninstallbin.sh | 4 +- source3/script/uninstallcp.sh | 33 -------------- source3/script/uninstallmodules.sh | 37 +++++++++++++++ 6 files changed, 65 insertions(+), 171 deletions(-) delete mode 100755 source3/script/installcp.sh create mode 100755 source3/script/installmodules.sh delete mode 100755 source3/script/makeyodldocs.sh delete mode 100755 source3/script/uninstallcp.sh create mode 100755 source3/script/uninstallmodules.sh (limited to 'source3/script') diff --git a/source3/script/installcp.sh b/source3/script/installcp.sh deleted file mode 100755 index d0c5bf8ecc..0000000000 --- a/source3/script/installcp.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -srcdir=$1 -LIBDIR=$2 -CODEPAGEDIR=$3 -BINDIR=$4 - -shift -shift -shift -shift - -echo Installing codepage files in $CODEPAGEDIR -for d in $LIBDIR $CODEPAGEDIR; do -if [ ! -d $d ]; then -mkdir $d -if [ ! -d $d ]; then - echo Failed to make directory $d - exit 1 -fi -fi -done - -for p in $*; do - if [ -f ${srcdir}/codepages/codepage_def.$p ]; then - echo Creating codepage file $CODEPAGEDIR/codepage.$p - $BINDIR/make_smbcodepage c $p ${srcdir}/codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p - fi - if [ -f ${srcdir}/codepages/CP${p}.TXT ]; then - echo Creating unicode map $CODEPAGEDIR/unicode_map.$p - $BINDIR/make_unicodemap $p ${srcdir}/codepages/CP${p}.TXT $CODEPAGEDIR/unicode_map.$p - fi -done - - -cat << EOF -====================================================================== -The code pages have been installed. You may uninstall them using the -command "make uninstallcp" or make "uninstall" to uninstall binaries, -man pages, shell scripts and code pages. -====================================================================== -EOF - -exit 0 - diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh new file mode 100755 index 0000000000..9b9d950ca2 --- /dev/null +++ b/source3/script/installmodules.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +INSTALLPERMS=$1 +BASEDIR=$2 +LIBDIR=$3 +shift +shift +shift + +for p in $*; do + p2=`basename $p` + echo Installing $p as $LIBDIR/$p2 + cp -f $p $LIBDIR/ + chmod $INSTALLPERMS $LIBDIR/$p2 +done + + +cat << EOF +====================================================================== +The modules are installed. You may uninstall the modules using the +command "make uninstallmodules" or "make uninstall" to uninstall +binaries, man pages, shell scripts and modules. +====================================================================== +EOF + +exit 0 diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh deleted file mode 100755 index 5b54df033e..0000000000 --- a/source3/script/makeyodldocs.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/sh -SRCDIR=$1 -shift -FILES=$@ - -if test -z $FILES; then - FILES=*.yo -fi - -YODLDIR=$SRCDIR/../docs/yodldocs -MANPAGEDIR=$SRCDIR/../docs/manpages -HTMLDIR=$SRCDIR/../docs/htmldocs - -echo "Re-creating man pages and HTML pages from YODL sources..." - -if [ ! -d $MANPAGEDIR ]; then - echo "directory $MANPAGEDIR does not exist, are we in the right place?" - exit 1 -fi - -if [ ! -d $HTMLDIR ]; then - echo "directory $HTMLDIR does not exist, are we in the right place?" - exit 1 -fi - -if [ ! -d $YODLDIR ]; then - echo "directory $YODLDIR does not exist, are we in the right place?" - exit 1 -fi - -cd $YODLDIR - -for d in $FILES -do - -# -# Create the basename from the YODL manpage -# - bn=`echo $d | sed -e 's/\.yo//'` - - case "$d" - in - *.[0-9].yo) - echo "Creating man pages..." - echo $d - rm -f $bn.man - yodl2man $d - if [ ! -f $bn.man ]; then - echo "Failed to make man page for $d" - exit 1 - fi - cp $bn.man ../manpages/$bn || echo "Cannot create $YODLDIR/../manpages/$bn" - rm -f $bn.man - - echo "Creating html versions of man pages..." - echo $d - rm -f $bn.html - yodl2html $d - if [ ! -f $bn.html ]; then - echo "Failed to make html page for $d" - exit 1 - fi - cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" - rm -f $bn.html - ;; - *) -# -# Non man-page YODL docs - just make html and text. -# - echo $d - rm -f $bn.html - yodl2html $d - if [ ! -f $bn.html ]; then - echo "Failed to make html page for $d" - exit 1 - fi - cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" - rm -f $bn.html - rm -f $bn.txt - yodl2txt $d - if [ ! -f $bn.txt ]; then - echo "Failed to make text page for $d" - exit 1 - fi - cp $bn.txt ../textdocs || echo "Cannot create $YODLDIR/../textdocs/$bn.txt" - rm -f $bn.txt - ;; - esac -done - -echo "Remember to CVS check in your changes..." -exit 0 diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh index 53775f8946..a8bbdea7af 100755 --- a/source3/script/uninstallbin.sh +++ b/source3/script/uninstallbin.sh @@ -34,8 +34,8 @@ cat << EOF ====================================================================== The binaries have been uninstalled. You may restore the binaries using the command "make installbin" or "make install" to install binaries, -man pages and shell scripts. You can restore a previous version of the -binaries (if there were any) using "make revert". +man pages, modules and shell scripts. You can restore a previous +version of the binaries (if there were any) using "make revert". ====================================================================== EOF diff --git a/source3/script/uninstallcp.sh b/source3/script/uninstallcp.sh deleted file mode 100755 index 2a9e9d509a..0000000000 --- a/source3/script/uninstallcp.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -CPDIR=$1 -shift - -if [ ! -d $CPDIR ]; then - echo Directory $CPDIR does not exist! - echo Do a "make installcp" or "make install" first. - exit 1 -fi - -for p in $*; do - if [ ! -f $CPDIR/unicode_map.$p ]; then - echo $CPDIR/unicode_map.$p does not exist! - else - echo Removing $CPDIR/unicode_map.$p - rm -f $CPDIR/unicode_map.$p - if [ -f $CPDIR/unicode_map.$p ]; then - echo Cannot remove $CPDIR/unicode_map.$p... does $USER have privileges? - fi - fi -done - -cat << EOF -====================================================================== -The code pages have been uninstalled. You may reinstall them using -the command "make installcp" or "make install" to install binaries, -man pages, shell scripts and code pages. You may recover a previous version -(if any with "make revert"). -====================================================================== -EOF - -exit 0 diff --git a/source3/script/uninstallmodules.sh b/source3/script/uninstallmodules.sh new file mode 100755 index 0000000000..30582a39fa --- /dev/null +++ b/source3/script/uninstallmodules.sh @@ -0,0 +1,37 @@ +#!/bin/sh +#4 July 96 Dan.Shearer@UniSA.edu.au + +INSTALLPERMS=$1 +BASEDIR=$2 +LIBDIR=$3 +shift +shift +shift + +if [ ! -d $LIBDIR ]; then + echo Directory $LIBDIR does not exist! + echo Do a "make installmodules" or "make install" first. + exit 1 +fi + +for p in $*; do + p2=`basename $p` + if [ -f $LIBDIR/$p2 ]; then + echo Removing $LIBDIR/$p2 + rm -f $LIBDIR/$p2 + if [ -f $LIBDIR/$p2 ]; then + echo Cannot remove $LIBDIR/$p2 ... does $USER have privileges? + fi + fi +done + + +cat << EOF +====================================================================== +The modules have been uninstalled. You may restore the modules using +the command "make installmodules" or "make install" to install +binaries, modules, man pages and shell scripts. +====================================================================== +EOF + +exit 0 -- cgit From 72948b91a01e8da944ee12d46f5e757b51b64c8e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 26 Nov 2002 23:18:35 +0000 Subject: * fixing RedHat spec file for 3.0 * updating Makefile & configure script to use CONFIGDIR & VFSLIBDIR * set LIBDIR to ${prefix}/lib/samba when --with-fhs is enabled * make installdirs take an arbitrary number of arguements (This used to be commit f0d09cf676bc335e8fde9fe730730f2949411a54) --- source3/script/installdirs.sh | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installdirs.sh b/source3/script/installdirs.sh index dd8f7cd19c..9557b86d3b 100755 --- a/source3/script/installdirs.sh +++ b/source3/script/installdirs.sh @@ -1,20 +1,17 @@ #!/bin/sh -BASEDIR=$1 -SBINDIR=$2 -BINDIR=$3 -LIBDIR=$4 -VARDIR=$5 -PRIVATEDIR=$6 +while ( test -n "$1" ); do + if [ ! -d $1 ]; then + mkdir -p $1 + fi -for d in $BASEDIR $SBINDIR $BINDIR $LIBDIR $VARDIR $PRIVATEDIR; do -if [ ! -d $d ]; then -mkdir $d -if [ ! -d $d ]; then - echo Failed to make directory $d - exit 1 -fi -fi + if [ ! -d $1 ]; then + echo Failed to make directory $1 + exit 1 + fi + + shift; done + -- cgit From f3e3a56ea9085b186af24b0b4e911863fd9ceacc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 29 Nov 2002 02:58:59 +0000 Subject: Merge a bunch of trivial changes from HEAD. The difference remaining should actual functional differences between HEAD and 3.0. - Mostly reformatting - Removal of unecessary #include "smb.h" - Merge of dyn_DRIVERFILE removal - Silly bug fix for python code (This used to be commit d3998307adc50ba50defe610cb656c73799ae3b9) --- source3/script/uninstallbin.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh index 53775f8946..a8bbdea7af 100755 --- a/source3/script/uninstallbin.sh +++ b/source3/script/uninstallbin.sh @@ -34,8 +34,8 @@ cat << EOF ====================================================================== The binaries have been uninstalled. You may restore the binaries using the command "make installbin" or "make install" to install binaries, -man pages and shell scripts. You can restore a previous version of the -binaries (if there were any) using "make revert". +man pages, modules and shell scripts. You can restore a previous +version of the binaries (if there were any) using "make revert". ====================================================================== EOF -- cgit From 1cee6e571ee39ef917f2c8972f6a6d5d38074363 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Tue, 10 Dec 2002 21:56:21 +0000 Subject: fix broken incremental tar - merge from 2.2 found by "Jacob Anawalt" (This used to be commit cfef980566f195c060c0d2fa22983427e8d6570c) --- source3/script/smbtar | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/smbtar b/source3/script/smbtar index cf3ff0ebe6..f062cba9f0 100644 --- a/source3/script/smbtar +++ b/source3/script/smbtar @@ -80,7 +80,8 @@ while getopts riavl:b:d:N:s:p:x:u:Xt: c; do tarcmd="x" ;; i) # [i]ncremental - tarargs=${tarargs}g + tarargs=${tarargs}ga + clientargs="-c 'tarmode inc'" ;; a) # [a]rchive tarargs=${tarargs}a -- cgit From c9fce34d0034555697d5c7b6a4b05306d08e1294 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 15 Jan 2003 16:29:38 +0000 Subject: remving more unused files (This used to be commit e3f9b68deecb61274ead2086a0ed977d5318b09c) --- source3/script/installcp.sh | 44 ------------------------------------------- source3/script/uninstallcp.sh | 33 -------------------------------- 2 files changed, 77 deletions(-) delete mode 100755 source3/script/installcp.sh delete mode 100755 source3/script/uninstallcp.sh (limited to 'source3/script') diff --git a/source3/script/installcp.sh b/source3/script/installcp.sh deleted file mode 100755 index d0c5bf8ecc..0000000000 --- a/source3/script/installcp.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -srcdir=$1 -LIBDIR=$2 -CODEPAGEDIR=$3 -BINDIR=$4 - -shift -shift -shift -shift - -echo Installing codepage files in $CODEPAGEDIR -for d in $LIBDIR $CODEPAGEDIR; do -if [ ! -d $d ]; then -mkdir $d -if [ ! -d $d ]; then - echo Failed to make directory $d - exit 1 -fi -fi -done - -for p in $*; do - if [ -f ${srcdir}/codepages/codepage_def.$p ]; then - echo Creating codepage file $CODEPAGEDIR/codepage.$p - $BINDIR/make_smbcodepage c $p ${srcdir}/codepages/codepage_def.$p $CODEPAGEDIR/codepage.$p - fi - if [ -f ${srcdir}/codepages/CP${p}.TXT ]; then - echo Creating unicode map $CODEPAGEDIR/unicode_map.$p - $BINDIR/make_unicodemap $p ${srcdir}/codepages/CP${p}.TXT $CODEPAGEDIR/unicode_map.$p - fi -done - - -cat << EOF -====================================================================== -The code pages have been installed. You may uninstall them using the -command "make uninstallcp" or make "uninstall" to uninstall binaries, -man pages, shell scripts and code pages. -====================================================================== -EOF - -exit 0 - diff --git a/source3/script/uninstallcp.sh b/source3/script/uninstallcp.sh deleted file mode 100755 index 2a9e9d509a..0000000000 --- a/source3/script/uninstallcp.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -CPDIR=$1 -shift - -if [ ! -d $CPDIR ]; then - echo Directory $CPDIR does not exist! - echo Do a "make installcp" or "make install" first. - exit 1 -fi - -for p in $*; do - if [ ! -f $CPDIR/unicode_map.$p ]; then - echo $CPDIR/unicode_map.$p does not exist! - else - echo Removing $CPDIR/unicode_map.$p - rm -f $CPDIR/unicode_map.$p - if [ -f $CPDIR/unicode_map.$p ]; then - echo Cannot remove $CPDIR/unicode_map.$p... does $USER have privileges? - fi - fi -done - -cat << EOF -====================================================================== -The code pages have been uninstalled. You may reinstall them using -the command "make installcp" or "make install" to install binaries, -man pages, shell scripts and code pages. You may recover a previous version -(if any with "make revert"). -====================================================================== -EOF - -exit 0 -- cgit From e4819ee88bfcdd90845bcbfbe8912afcb1095367 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 15 Jan 2003 16:32:06 +0000 Subject: more unused files (This used to be commit d223ea87ae202574714da5c4eadbe281f8699a80) --- source3/script/makeyodldocs.sh | 92 ------------------------------------------ 1 file changed, 92 deletions(-) delete mode 100755 source3/script/makeyodldocs.sh (limited to 'source3/script') diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh deleted file mode 100755 index 5b54df033e..0000000000 --- a/source3/script/makeyodldocs.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/sh -SRCDIR=$1 -shift -FILES=$@ - -if test -z $FILES; then - FILES=*.yo -fi - -YODLDIR=$SRCDIR/../docs/yodldocs -MANPAGEDIR=$SRCDIR/../docs/manpages -HTMLDIR=$SRCDIR/../docs/htmldocs - -echo "Re-creating man pages and HTML pages from YODL sources..." - -if [ ! -d $MANPAGEDIR ]; then - echo "directory $MANPAGEDIR does not exist, are we in the right place?" - exit 1 -fi - -if [ ! -d $HTMLDIR ]; then - echo "directory $HTMLDIR does not exist, are we in the right place?" - exit 1 -fi - -if [ ! -d $YODLDIR ]; then - echo "directory $YODLDIR does not exist, are we in the right place?" - exit 1 -fi - -cd $YODLDIR - -for d in $FILES -do - -# -# Create the basename from the YODL manpage -# - bn=`echo $d | sed -e 's/\.yo//'` - - case "$d" - in - *.[0-9].yo) - echo "Creating man pages..." - echo $d - rm -f $bn.man - yodl2man $d - if [ ! -f $bn.man ]; then - echo "Failed to make man page for $d" - exit 1 - fi - cp $bn.man ../manpages/$bn || echo "Cannot create $YODLDIR/../manpages/$bn" - rm -f $bn.man - - echo "Creating html versions of man pages..." - echo $d - rm -f $bn.html - yodl2html $d - if [ ! -f $bn.html ]; then - echo "Failed to make html page for $d" - exit 1 - fi - cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" - rm -f $bn.html - ;; - *) -# -# Non man-page YODL docs - just make html and text. -# - echo $d - rm -f $bn.html - yodl2html $d - if [ ! -f $bn.html ]; then - echo "Failed to make html page for $d" - exit 1 - fi - cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html" - rm -f $bn.html - rm -f $bn.txt - yodl2txt $d - if [ ! -f $bn.txt ]; then - echo "Failed to make text page for $d" - exit 1 - fi - cp $bn.txt ../textdocs || echo "Cannot create $YODLDIR/../textdocs/$bn.txt" - rm -f $bn.txt - ;; - esac -done - -echo "Remember to CVS check in your changes..." -exit 0 -- cgit From 99cdb462083381c88689a4e698ca48b6ed4cf5ac Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 15 Jan 2003 18:57:41 +0000 Subject: *lots of small merges form HEAD *sync up configure.in *don't build torture tools in make all *make sure to remove torture tools as part of make clean (This used to be commit 0fb724b3216eeeb97e61ff12755ca3a31bcad6ef) --- source3/script/findsmb.in | 21 ++++++++++++++------- source3/script/installmodules.sh | 10 ++++++++++ 2 files changed, 24 insertions(+), 7 deletions(-) (limited to 'source3/script') diff --git a/source3/script/findsmb.in b/source3/script/findsmb.in index d2aa94591b..5ca1d8082a 100755 --- a/source3/script/findsmb.in +++ b/source3/script/findsmb.in @@ -5,7 +5,7 @@ # run as root to get correct info from WIN95 clients. # # syntax: -# findsmb [subnet broadcast address] +# findsmb [-d|-D] [-r] [subnet broadcast address] # # with no agrument it will list machines on the current subnet # @@ -13,21 +13,28 @@ # local master browsers for that workgroup. There will be an "*" in front # of the workgroup name for machines that are the domain master browser for # that workgroup. +# +# Options: +# +# -d|-D enable debug +# -r add -r option to nmblookup when finding netbios name # $SAMBABIN = "@prefix@/bin"; -for ($i = 0; $i < 2; $i++) { # test for -d option and broadcast address +for ($i = 0; $i < 2; $i++) { # test for -d and -r options $_ = shift; if (m/-d|-D/) { $DEBUG = 1; - } else { - if ($_) { - $BCAST = "-B $_"; - } + } else (m/-r/) { + $R_OPTION = "-r"; } } +if ($_) { # set broadcast address if it was specified + $BCAST = "-B $_"; +} + sub ipsort # do numeric sort on last field of IP address { @t1 = split(/\./,$a); @@ -56,7 +63,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found # find the netbios names registered by each machine - open(NMBLOOKUP,"$SAMBABIN/nmblookup -r -A $ip|") || + open(NMBLOOKUP,"$SAMBABIN/nmblookup $R_OPTION -A $ip|") || die("Can't get nmb name list.\n"); @nmblookup = ; close NMBLOOKUP; diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh index 9b9d950ca2..ec5691992d 100755 --- a/source3/script/installmodules.sh +++ b/source3/script/installmodules.sh @@ -7,6 +7,16 @@ shift shift shift +for d in $BASEDIR $LIBDIR; do +if [ ! -d $d ]; then +mkdir $d +if [ ! -d $d ]; then + echo Failed to make directory $d + exit 1 +fi +fi +done + for p in $*; do p2=`basename $p` echo Installing $p as $LIBDIR/$p2 -- cgit From 6789cc3de6b775a744d3cd31ae30cc93487e5474 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 29 Jan 2003 13:14:18 +0000 Subject: Merge from HEAD - fix to findsmb by Waider (This used to be commit 28258224ded31e9a0a4304170ce98534ddfa0dfa) --- source3/script/findsmb.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/findsmb.in b/source3/script/findsmb.in index 5ca1d8082a..42c1dd706c 100755 --- a/source3/script/findsmb.in +++ b/source3/script/findsmb.in @@ -26,7 +26,7 @@ for ($i = 0; $i < 2; $i++) { # test for -d and -r options $_ = shift; if (m/-d|-D/) { $DEBUG = 1; - } else (m/-r/) { + } elsif (m/-r/) { $R_OPTION = "-r"; } } -- cgit From 89393d93b0d58504b65a423cc442bee4d7051298 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 10 Feb 2003 17:31:25 +0000 Subject: autogen - cope with autoconf-2.53/2.13 systems (like RH 7.3) findsmb - use @PERL@ (This used to be commit f869db787b555dc99e30d82493666c8a388f8f81) --- source3/script/findsmb.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/findsmb.in b/source3/script/findsmb.in index 42c1dd706c..6276bd3f39 100755 --- a/source3/script/findsmb.in +++ b/source3/script/findsmb.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!@PERL@ # # Prints info on all smb responding machines on a subnet. # This script needs to be run on a machine without nmbd running and be -- cgit From 7a3a9217486ac9237b7d812bd2a5de1da10bef28 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 14 Apr 2003 05:27:04 +0000 Subject: Merge: add PAC_DATA as valid return type. (This used to be commit a9df8ec5879cd0d47db86f5a5f7b0bd7e9d6b824) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 9acdf374f1..919ae2aa7e 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -142,7 +142,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^DEVICEMODE/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^DEVICEMODE|^PAC_DATA/ ) { gotstart = 1; } -- cgit From fbc62e3bfcc1c78cce9943add04c05745f772fb0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 15 Apr 2003 17:04:10 +0000 Subject: Use XML format instead of SGML format (merge from HEAD) (This used to be commit 858017b16f8e6f1efd8e7df5c0e2c7fd08091ae3) --- source3/script/find_missing_doc.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/find_missing_doc.pl b/source3/script/find_missing_doc.pl index b582446569..b27a405e4d 100755 --- a/source3/script/find_missing_doc.pl +++ b/source3/script/find_missing_doc.pl @@ -30,7 +30,7 @@ close(IN); open(IN,$topdir.$doc_file) || die("Can't open $topdir$doc_file"); while() { - if( /([^<]*?)([ ]*)\(.\)([ ]*)<\/term>/g ) { + if( /([^<]*?)([ ]*)\(.\)([ ]*)<\/term>/g ) { $key = $1; $value = $2; $doc{$value} = $key; -- cgit From 858137d0dd8672f25e4bfe21ce79ff280bd2457b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 21 Apr 2003 01:04:17 +0000 Subject: - Fix modules build of pdb_mysql and pdb_xml - Fix typo in script/installswat.sh (This used to be commit 8d2aec7a73d41a9d32c10abd1c8833ebfd41dd77) --- source3/script/installswat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index c66604cdb8..d1f8ea191d 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -1,5 +1,5 @@ #!/bin/sh -#fist version March 1998, Andrew Tridgell +#first version March 1998, Andrew Tridgell SWATDIR=$1 SRCDIR=$2/ -- cgit From 53004910ebe729809e7d3c9724f338d1b763be9b Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 23 Apr 2003 14:19:03 +0000 Subject: Patch by Vance Lankhaar to automaticly regenerate the build options, so we will always have the right values for how and when an smbd was built. In particular, this is indended to address bitrot caused by configure.in changes. Andrew Bartlett (This used to be commit 2be258071c71986ba9af01e9a09ec49909a620dd) --- source3/script/build_env.sh | 26 ++-- source3/script/mkbuildoptions.awk | 262 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 278 insertions(+), 10 deletions(-) create mode 100644 source3/script/mkbuildoptions.awk (limited to 'source3/script') diff --git a/source3/script/build_env.sh b/source3/script/build_env.sh index 0000759f16..eb54f37aed 100755 --- a/source3/script/build_env.sh +++ b/source3/script/build_env.sh @@ -1,25 +1,31 @@ #!/bin/sh +if [ $# -lt 3 ] +then + echo "Usage: $0 srcdir builddir compiler" + exit 1 +fi + uname=`uname -a` date=`date` srcdir=$1 builddir=$2 compiler=$3 - if [ ! "x$USER" = "x" ]; then - whoami=$USER - else - if [ ! "x$LOGNAME" = "x" ]; then - whoami=$LOGNAME - else - whoami=`whoami || id -un` - fi - fi +if [ ! "x$USER" = "x" ]; then + whoami=$USER +else + if [ ! "x$LOGNAME" = "x" ]; then + whoami=$LOGNAME + else + whoami=`whoami || id -un` + fi +fi host=`hostname` cat < 2003"; + print " Copyright (C) Andrew Bartlett 2001"; + print " "; + print " This program is free software; you can redistribute it and/or modify"; + print " it under the terms of the GNU General Public License as published by"; + print " the Free Software Foundation; either version 2 of the License, or"; + print " (at your option) any later version."; + print " "; + print " This program is distributed in the hope that it will be useful,"; + print " but WITHOUT ANY WARRANTY; without even the implied warranty of"; + print " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"; + print " GNU General Public License for more details."; + print " "; + print " You should have received a copy of the GNU General Public License"; + print " along with this program; if not, write to the Free Software"; + print " Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA."; + print "*/"; + print ""; + print "#include \"includes.h\""; + print "#include \"build_env.h\""; + print "#include \"dynconfig.h\""; + print ""; + print "static void output(BOOL screen, const char *format, ...) PRINTF_ATTRIBUTE(2,3);"; + print ""; + print ""; + print "/****************************************************************************"; + print "helper function for build_options"; + print "****************************************************************************/"; + print "static void output(BOOL screen, const char *format, ...)"; + print "{"; + print " char *ptr;"; + print " va_list ap;"; + print " "; + print " va_start(ap, format);"; + print " vasprintf(&ptr,format,ap);"; + print " va_end(ap);"; + print ""; + print " if (screen) {"; + print " d_printf(\"%s\", ptr);"; + print " } else {"; + print " DEBUG(4,(\"%s\", ptr));"; + print " }"; + print " "; + print " SAFE_FREE(ptr);"; + print "}"; + print ""; + print "/****************************************************************************"; + print "options set at build time for the samba suite"; + print "****************************************************************************/"; + print "void build_options(BOOL screen)"; + print "{"; + print " if ((DEBUGLEVEL < 4) && (!screen)) {"; + print " return;"; + print " }"; + print ""; + print "#ifdef _BUILD_ENV_H"; + print " /* Output information about the build environment */"; + print " output(screen,\"Build environment:\\n\");"; + print " output(screen,\" Built by: %s@%s\\n\",BUILD_ENV_USER,BUILD_ENV_HOST);"; + print " output(screen,\" Built on: %s\\n\",BUILD_ENV_DATE);"; + print ""; + print " output(screen,\" Built using: %s\\n\",BUILD_ENV_COMPILER);"; + print " output(screen,\" Build host: %s\\n\",BUILD_ENV_UNAME);"; + print " output(screen,\" SRCDIR: %s\\n\",BUILD_ENV_SRCDIR);"; + print " output(screen,\" BUILDDIR: %s\\n\",BUILD_ENV_BUILDDIR);"; + print ""; + print " "; + print "#endif"; + print ""; + + print " /* Output various paths to files and directories */"; + print " output(screen,\"\\nPaths:\\n\");"; + + print " output(screen,\" SBINDIR: %s\\n\", dyn_SBINDIR);"; + print " output(screen,\" BINDIR: %s\\n\", dyn_BINDIR);"; + print " output(screen,\" SWATDIR: %s\\n\", dyn_SWATDIR);"; + + print " output(screen,\" CONFIGFILE: %s\\n\", dyn_CONFIGFILE);"; + print " output(screen,\" LOGFILEBASE: %s\\n\", dyn_LOGFILEBASE);"; + print " output(screen,\" LMHOSTSFILE: %s\\n\",dyn_LMHOSTSFILE);"; + + print " output(screen,\" LIBDIR: %s\\n\",dyn_LIBDIR);"; + print " output(screen,\" SHLIBEXT: %s\\n\",dyn_SHLIBEXT);"; + + print " output(screen,\" LOCKDIR: %s\\n\",dyn_LOCKDIR);"; + print " output(screen,\" PIDDIR: %s\\n\", dyn_PIDDIR);"; + + print " output(screen,\" SMB_PASSWD_FILE: %s\\n\",dyn_SMB_PASSWD_FILE);"; + print " output(screen,\" PRIVATE_DIR: %s\\n\",dyn_PRIVATE_DIR);"; + print ""; + + +################################################## +# predefine first element of *_ary +# predefine *_i (num of elements in *_ary) + with_ary[0]=""; + with_i=0; + have_ary[0]=""; + have_i=0; + utmp_ary[0]=""; + utmp_i=0; + misc_ary[0]=""; + misc_i=0; + sys_ary[0]=""; + sys_i=0; + headers_ary[0]=""; + headers_i=0; + in_comment = 0; +} + +# capture single line comments +/^\/\* (.*?)\*\// { + last_comment = $0; + next; +} + +# end capture multi-line comments +/(.*?)\*\// { + last_comment = last_comment $0; + in_comment = 0; + next; +} + +# capture middle lines of multi-line comments +in_comment { + last_comment = last_comment $0; + next; +} + +# begin capture multi-line comments +/^\/\* (.*?)/ { + last_comment = $0; + in_comment = 1; + next +} + +################################################## +# if we have an #undef and a last_comment, store it +/^\#undef/ { + split($0,a); + comments_ary[a[2]] = last_comment; + last_comment = ""; +} + +################################################## +# for each line, sort into appropriate section +# then move on + +/^\#undef WITH/ { + with_ary[with_i++] = a[2]; + # we want (I think) to allow --with to show up in more than one place, so no next +} + + +/^\#undef HAVE_UT_UT_/ || /^\#undef .*UTMP/ { + utmp_ary[utmp_i++] = a[2]; + next; +} + +/^\#undef HAVE_SYS_.*?_H$/ { + sys_ary[sys_i++] = a[2]; + next; +} + +/^\#undef HAVE_.*?_H$/ { + headers_ary[headers_i++] = a[2]; + next; +} + +/^\#undef HAVE_/ { + have_ary[have_i++] = a[2]; + next; +} + +/^\#undef/ { + misc_ary[misc_i++] = a[2]; + next; +} + + +################################################## +# simple sort function +function sort(ARRAY, ELEMENTS) { + for (i = 1; i <= ELEMENTS; ++i) { + for (j = i; (j-1) in ARRAY && (j) in ARRAY && ARRAY[j-1] > ARRAY[j]; --j) { + temp = ARRAY[j]; + ARRAY[j] = ARRAY[j-1]; + ARRAY[j-1] = temp; + } + } + return; +} + + +################################################## +# output code from list of defined +# expects: ARRAY an array of things defined +# ELEMENTS number of elements in ARRAY +# TITLE title for section +# returns: nothing +function output(ARRAY, ELEMENTS, TITLE) { + + # add section header + print "\n\t/* Show " TITLE " */"; + print "\toutput(screen, \"\\n " TITLE ":\\n\");\n"; + + + # sort element using bubble sort (slow, but easy) + sort(ARRAY, ELEMENTS); + + # loop through array of defines, outputting code + for (i = 0; i < ELEMENTS; i++) { + print "#ifdef " ARRAY[i]; + + # I don't know which one to use.... + + print "\toutput(screen, \" " ARRAY[i] "\\n\");"; + #printf "\toutput(screen, \" %s\\n %s\\n\\n\");\n", comments_ary[ARRAY[i]], ARRAY[i]; + #printf "\toutput(screen, \" %-35s %s\\n\");\n", ARRAY[i], comments_ary[ARRAY[i]]; + + print "#endif"; + } + return; +} + +END { + ################################################## + # add code to show various options + print "/* Output various other options (as gleaned from include/config.h.in) */"; + output(sys_ary, sys_i, "System Headers"); + output(headers_ary, headers_i, "Headers"); + output(utmp_ary, utmp_i, "UTMP Options"); + output(have_ary, have_i, "HAVE_* Defines"); + output(with_ary, with_i, "--with Options"); + output(misc_ary, misc_i, "Build Options"); + + ################################################## + # add code to display the various type sizes + print " /* Output the sizes of the various types */"; + print " output(screen, \"\\nType sizes:\\n\");"; + print " output(screen, \" sizeof(char): %d\\n\",sizeof(char));"; + print " output(screen, \" sizeof(int): %d\\n\",sizeof(int));"; + print " output(screen, \" sizeof(long): %d\\n\",sizeof(long));"; + print " output(screen, \" sizeof(uint8): %d\\n\",sizeof(uint8));"; + print " output(screen, \" sizeof(uint16): %d\\n\",sizeof(uint16));"; + print " output(screen, \" sizeof(uint32): %d\\n\",sizeof(uint32));"; + print " output(screen, \" sizeof(short): %d\\n\",sizeof(short));"; + print " output(screen, \" sizeof(void*): %d\\n\",sizeof(void*));"; + + ################################################## + # add code to give information about modules + print " output(screen, \"\\nBuiltin modules:\\n\");"; + print " output(screen, \" %s\\n\", STRING_STATIC_MODULES);"; + + print "}"; + +} + -- cgit From df31340b5d751854545259839ad8d38a95e5efae Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 29 Apr 2003 03:04:05 +0000 Subject: Fix for format string warning from vance (This used to be commit 0369d4432b9700626b6853dae8c93770bb1bcd59) --- source3/script/mkbuildoptions.awk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkbuildoptions.awk b/source3/script/mkbuildoptions.awk index 391fdf531e..cdc5bd9881 100644 --- a/source3/script/mkbuildoptions.awk +++ b/source3/script/mkbuildoptions.awk @@ -242,14 +242,14 @@ END { # add code to display the various type sizes print " /* Output the sizes of the various types */"; print " output(screen, \"\\nType sizes:\\n\");"; - print " output(screen, \" sizeof(char): %d\\n\",sizeof(char));"; - print " output(screen, \" sizeof(int): %d\\n\",sizeof(int));"; - print " output(screen, \" sizeof(long): %d\\n\",sizeof(long));"; - print " output(screen, \" sizeof(uint8): %d\\n\",sizeof(uint8));"; - print " output(screen, \" sizeof(uint16): %d\\n\",sizeof(uint16));"; - print " output(screen, \" sizeof(uint32): %d\\n\",sizeof(uint32));"; - print " output(screen, \" sizeof(short): %d\\n\",sizeof(short));"; - print " output(screen, \" sizeof(void*): %d\\n\",sizeof(void*));"; + print " output(screen, \" sizeof(char): %u\\n\",sizeof(char));"; + print " output(screen, \" sizeof(int): %u\\n\",sizeof(int));"; + print " output(screen, \" sizeof(long): %u\\n\",sizeof(long));"; + print " output(screen, \" sizeof(uint8): %u\\n\",sizeof(uint8));"; + print " output(screen, \" sizeof(uint16): %u\\n\",sizeof(uint16));"; + print " output(screen, \" sizeof(uint32): %u\\n\",sizeof(uint32));"; + print " output(screen, \" sizeof(short): %u\\n\",sizeof(short));"; + print " output(screen, \" sizeof(void*): %u\\n\",sizeof(void*));"; ################################################## # add code to give information about modules -- cgit From 1f84a14b0bae513fc2fdad4fe6fca32e05af67bc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Fri, 23 May 2003 01:59:43 +0000 Subject: Bug 83: fixes for building when $srcdir != $builddir from David Lee (This used to be commit e48a8b5e9c1a75c6e4bffe022d0e25edae89bc58) --- source3/script/mkproto.sh | 43 ---------------------------------------- source3/script/mkproto.sh.in | 47 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 43 deletions(-) delete mode 100755 source3/script/mkproto.sh create mode 100755 source3/script/mkproto.sh.in (limited to 'source3/script') diff --git a/source3/script/mkproto.sh b/source3/script/mkproto.sh deleted file mode 100755 index 2bf96c9b41..0000000000 --- a/source3/script/mkproto.sh +++ /dev/null @@ -1,43 +0,0 @@ -#! /bin/sh - -LANG=C; export LANG -LC_ALL=C; export LC_ALL -LC_COLLATE=C; export LC_COLLATE - -if [ $# -lt 3 ] -then - echo "Usage: $0 awk [-h headerdefine] outputheader proto_obj" - exit 1 -fi - -awk="$1" -shift - -if [ x"$1" = x-h ] -then - headeropt="-v headername=$2" - shift; shift; -else - headeropt="" -fi - -header="$1" -shift -headertmp="$header.$$.tmp~" - -proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped'`" - -echo creating $header - -mkdir -p `dirname $header` - -${awk} $headeropt \ - -f script/mkproto.awk $proto_src > $headertmp - -if cmp -s $header $headertmp 2>/dev/null -then - echo "$header unchanged" - rm $headertmp -else - mv $headertmp $header -fi diff --git a/source3/script/mkproto.sh.in b/source3/script/mkproto.sh.in new file mode 100755 index 0000000000..8d7d300ff5 --- /dev/null +++ b/source3/script/mkproto.sh.in @@ -0,0 +1,47 @@ +#! /bin/sh -x + +LANG=C; export LANG +LC_ALL=C; export LC_ALL +LC_COLLATE=C; export LC_COLLATE + +# Need reference point for "mkproto.awk", including when "srcdir != builddir". +# Use of "abs_..." is unpleasant. Is there another way? +abs_srcdir=@abs_srcdir@ + +if [ $# -lt 3 ] +then + echo "Usage: $0 awk [-h headerdefine] outputheader proto_obj" + exit 1 +fi + +awk="$1" +shift + +if [ x"$1" = x-h ] +then + headeropt="-v headername=$2" + shift; shift; +else + headeropt="" +fi + +header="$1" +shift +headertmp="$header.$$.tmp~" + +proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped'`" + +echo creating $header + +mkdir -p `dirname $header` + +${awk} $headeropt \ + -f $abs_srcdir/mkproto.awk $proto_src > $headertmp + +if cmp -s $header $headertmp 2>/dev/null +then + echo "$header unchanged" + rm $headertmp +else + mv $headertmp $header +fi -- cgit From 53e8a1cf6ddb4c2cf3131089af5d2ff1d6842211 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 26 May 2003 07:02:02 +0000 Subject: Ignore autogenerated file. (This used to be commit de8180a28024a312c4d5bb97e274122d631580c2) --- source3/script/.cvsignore | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/script') diff --git a/source3/script/.cvsignore b/source3/script/.cvsignore index 7a8114ecd7..5efd0d33db 100644 --- a/source3/script/.cvsignore +++ b/source3/script/.cvsignore @@ -1 +1,2 @@ findsmb +mkproto.sh -- cgit From 4e8052640e4029938111d5a1af16865c67e21bf9 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 27 May 2003 02:35:53 +0000 Subject: More fixes for builddir != srcdir. - Use absolute directories for $builddir and $srcdir in the Makefile - Don't try and combine source files in $builddir and $srcdir to build proto.h. It's just too hard to get it right across all targets we wish to compile on. Use a hand created prototype for the single function in smbd/build_options.c that we need. This allows us to ditch all the extra sed work that was causing problems: \t not portable - hah! - Fix bogus delheaders target to remove the correct files This appears to work quite nicely now. Let's see how it goes on the buildfarm machines. (This used to be commit 456184463d35c18840c39cb3483b7136247ea764) --- source3/script/.cvsignore | 1 - source3/script/mkproto.sh | 43 ++++++++++++++++++++++++++++++++++++++++ source3/script/mkproto.sh.in | 47 -------------------------------------------- 3 files changed, 43 insertions(+), 48 deletions(-) create mode 100755 source3/script/mkproto.sh delete mode 100755 source3/script/mkproto.sh.in (limited to 'source3/script') diff --git a/source3/script/.cvsignore b/source3/script/.cvsignore index 5efd0d33db..7a8114ecd7 100644 --- a/source3/script/.cvsignore +++ b/source3/script/.cvsignore @@ -1,2 +1 @@ findsmb -mkproto.sh diff --git a/source3/script/mkproto.sh b/source3/script/mkproto.sh new file mode 100755 index 0000000000..2bf96c9b41 --- /dev/null +++ b/source3/script/mkproto.sh @@ -0,0 +1,43 @@ +#! /bin/sh + +LANG=C; export LANG +LC_ALL=C; export LC_ALL +LC_COLLATE=C; export LC_COLLATE + +if [ $# -lt 3 ] +then + echo "Usage: $0 awk [-h headerdefine] outputheader proto_obj" + exit 1 +fi + +awk="$1" +shift + +if [ x"$1" = x-h ] +then + headeropt="-v headername=$2" + shift; shift; +else + headeropt="" +fi + +header="$1" +shift +headertmp="$header.$$.tmp~" + +proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped'`" + +echo creating $header + +mkdir -p `dirname $header` + +${awk} $headeropt \ + -f script/mkproto.awk $proto_src > $headertmp + +if cmp -s $header $headertmp 2>/dev/null +then + echo "$header unchanged" + rm $headertmp +else + mv $headertmp $header +fi diff --git a/source3/script/mkproto.sh.in b/source3/script/mkproto.sh.in deleted file mode 100755 index 8d7d300ff5..0000000000 --- a/source3/script/mkproto.sh.in +++ /dev/null @@ -1,47 +0,0 @@ -#! /bin/sh -x - -LANG=C; export LANG -LC_ALL=C; export LC_ALL -LC_COLLATE=C; export LC_COLLATE - -# Need reference point for "mkproto.awk", including when "srcdir != builddir". -# Use of "abs_..." is unpleasant. Is there another way? -abs_srcdir=@abs_srcdir@ - -if [ $# -lt 3 ] -then - echo "Usage: $0 awk [-h headerdefine] outputheader proto_obj" - exit 1 -fi - -awk="$1" -shift - -if [ x"$1" = x-h ] -then - headeropt="-v headername=$2" - shift; shift; -else - headeropt="" -fi - -header="$1" -shift -headertmp="$header.$$.tmp~" - -proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped'`" - -echo creating $header - -mkdir -p `dirname $header` - -${awk} $headeropt \ - -f $abs_srcdir/mkproto.awk $proto_src > $headertmp - -if cmp -s $header $headertmp 2>/dev/null -then - echo "$header unchanged" - rm $headertmp -else - mv $headertmp $header -fi -- cgit From 93bcb9963bef53b91a0b16c6389cefdb7bea2b0e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 21 Jun 2003 04:05:01 +0000 Subject: merge of the netsamlogon caching code from APPLIANCE_HEAD This replaces the universal group caching code (was originally based on that code). Only applies to the the RPC code. One comment: domain local groups don't show up in 'getent group' that's easy to fix. Code has been tested against 2k domain but doesn't change anything with respect to NT4 domains. netsamlogon caching works pretty much like the universal group caching code did but has had much more testing and puts winbind mostly back in sync between branches. (This used to be commit aac01dc7bc95c20ee21c93f3581e2375d9a894e1) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 919ae2aa7e..31cbd96474 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -142,7 +142,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^DEVICEMODE|^PAC_DATA/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^DEVICEMODE|^PAC_DATA|^NET_USER_INFO_3/ ) { gotstart = 1; } -- cgit From 2e31bdaeb1c280e709594dca3f1ef543f4a6e0b2 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 4 Jul 2003 21:24:31 +0000 Subject: Add smb_event_id to list of return types (patch from metze) (This used to be commit 95c4c801fe80a4d8fce366e63b7f92cbf24930e5) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 31cbd96474..194a373caa 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -142,7 +142,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^DEVICEMODE|^PAC_DATA|^NET_USER_INFO_3/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^DEVICEMODE|^PAC_DATA|^NET_USER_INFO_3|^smb_event_id_t/ ) { gotstart = 1; } -- cgit From 16ff7b26f6b9d288cbd1d39e075b637e24da13a6 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 9 Jul 2003 16:44:47 +0000 Subject: Large set of changes to add UNIX account/group management to winbindd. See README.idmap-and-winbind-changes for details. (This used to be commit 1111bc7b0c7165e1cdf8d90eb49f4c368d2eded6) --- source3/script/mkproto.awk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 194a373caa..e91b42a73a 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -146,6 +146,10 @@ END { gotstart = 1; } + if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR/ ) { + gotstart = 1; + } + if(!gotstart) { next; } -- cgit From dd663f3f6fd296dbaf982bd74b3ea4a1a98e7ff6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 9 Jul 2003 18:31:03 +0000 Subject: Update for docbook XML (This used to be commit a61804b5ebc48ac9b9eb5f9b82d47fb4cf78f944) --- source3/script/find_missing_doc.pl | 57 ++++++++------------------------------ 1 file changed, 12 insertions(+), 45 deletions(-) (limited to 'source3/script') diff --git a/source3/script/find_missing_doc.pl b/source3/script/find_missing_doc.pl index b27a405e4d..2875cf77b8 100755 --- a/source3/script/find_missing_doc.pl +++ b/source3/script/find_missing_doc.pl @@ -1,60 +1,33 @@ #!/usr/bin/perl -my $doc_file = "/docs/docbook/manpages/smb.conf.5.sgml"; -my $source_file = "/source/param/loadparm.c"; - -my %link,%doc,%param; - -# This one shouldn't be documented at all -$doc{-valid} = "FOUND"; +my %doc; $topdir = (shift @ARGV) or $topdir = "."; ################################################## # Reading links from manpage -open(IN,$topdir.$doc_file); - -while() { - if( /([^<]*)<\/parameter><\/link><\/para><\/listitem>/g ){ - $link{$2} = $1; - $ref{$1} = $2; - } -} +$curdir = $ENV{PWD}; -close(IN); +chdir($topdir."/docs/docbook/smbdotconf"); -################################################## -# Reading documentation from manpage - -open(IN,$topdir.$doc_file) || die("Can't open $topdir$doc_file"); +open(IN,"xsltproc --xinclude --param smb.context ALL generate-context.xsl parameters.all.xml|"); while() { - if( /([^<]*?)([ ]*)\(.\)([ ]*)<\/term>/g ) { - $key = $1; - $value = $2; - $doc{$value} = $key; - - # There is a reference to this entry - if($ref{$key} eq $value){ - $ref{$key} = "FOUND"; - } else { - if($ref{$key}) { - print "$key should refer to $value, but refers to " . $ref{$key} . "\n"; - } else { - print "$key should refer to $value, but has no reference!\n"; - } - $ref{$key} = $value; - } + if( /([^<]*)<\/parameter><\/link><\/para><\/listitem>/g ){ + $doc{$2} = $1; } } close(IN); +chdir($curdir); + ################################################# # Reading entries from source code -open(SOURCE,$topdir.$source_file) || die("Can't open $topdir$source_file"); + +open(SOURCE,"$topdir/source/param/loadparm.c") or die("Can't open $topdir/source/param/loadparm.c: $!"); while ($ln = ) { last if $ln =~ m/^static\ struct\ parm_struct\ parm_table.*/; @@ -64,8 +37,8 @@ while ($ln = ) { last if $ln =~ m/^\s*\}\;\s*$/; #pull in the param names only next if $ln =~ m/.*P_SEPARATOR.*/; - next unless $ln =~ /.*\"(.*)\".*/; - + next unless $ln =~ /\s*\{\"(.*)\".*/; + if($doc{lc($1)}) { $doc{lc($1)} = "FOUND"; } else { @@ -77,12 +50,6 @@ close SOURCE; ################################################## # Trying to find missing references -foreach (keys %ref) { - if($ref{$_} cmp "FOUND") { - print "$_ references to " . $ref{$_} . ", but " . $ref{$_} . " isn't an anchor!\n"; - } -} - foreach (keys %doc) { if($doc{$_} cmp "FOUND") { print "$_ is documented but is not a configuration option!\n"; -- cgit From 46d115148c6c8c82b40733c4b4c9df9b2cb854aa Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 9 Jul 2003 18:51:18 +0000 Subject: Move find_missing_doc.pl to the docs system (This used to be commit 087e9af450109d749bfcc3016494d920b6028bf1) --- source3/script/find_missing_doc.pl | 57 -------------------------------------- 1 file changed, 57 deletions(-) delete mode 100755 source3/script/find_missing_doc.pl (limited to 'source3/script') diff --git a/source3/script/find_missing_doc.pl b/source3/script/find_missing_doc.pl deleted file mode 100755 index 2875cf77b8..0000000000 --- a/source3/script/find_missing_doc.pl +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/perl - -my %doc; - -$topdir = (shift @ARGV) or $topdir = "."; - -################################################## -# Reading links from manpage - -$curdir = $ENV{PWD}; - -chdir($topdir."/docs/docbook/smbdotconf"); - -open(IN,"xsltproc --xinclude --param smb.context ALL generate-context.xsl parameters.all.xml|"); - -while() { - if( /([^<]*)<\/parameter><\/link><\/para><\/listitem>/g ){ - $doc{$2} = $1; - } -} - -close(IN); - -chdir($curdir); - -################################################# -# Reading entries from source code - - -open(SOURCE,"$topdir/source/param/loadparm.c") or die("Can't open $topdir/source/param/loadparm.c: $!"); - -while ($ln = ) { - last if $ln =~ m/^static\ struct\ parm_struct\ parm_table.*/; -} #burn through the preceding lines - -while ($ln = ) { - last if $ln =~ m/^\s*\}\;\s*$/; - #pull in the param names only - next if $ln =~ m/.*P_SEPARATOR.*/; - next unless $ln =~ /\s*\{\"(.*)\".*/; - - if($doc{lc($1)}) { - $doc{lc($1)} = "FOUND"; - } else { - print "$1 is not documented!\n"; - } -} -close SOURCE; - -################################################## -# Trying to find missing references - -foreach (keys %doc) { - if($doc{$_} cmp "FOUND") { - print "$_ is documented but is not a configuration option!\n"; - } -} -- cgit From eb2b68302205e6dc217a4abdef494c45e9fc3cc0 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 14 Jul 2003 19:51:34 +0000 Subject: fix cache coherency bug in print handle print_info_2 cache. Needs to be rewritten to use a reference counter, but this will work for now. also the memory allocation in the printing code needs to be cleaned up to use talloc exclusively. (This used to be commit 3d293027563b36411b7f84ed9d8f47f926271c6f) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index e91b42a73a..6a45a70cc3 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -146,7 +146,7 @@ END { gotstart = 1; } - if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR/ ) { + if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2/ ) { gotstart = 1; } -- cgit From 6810e37aeed1c3a8fdf9b6a16629c5568dbeb821 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 16 Jul 2003 04:53:57 +0000 Subject: removing outdated scripts (This used to be commit b47b6f5825753b4ad130cdd372dbd023f78d3fd9) --- source3/script/addtosmbpass | 74 ---------------------------------------- source3/script/convert_smbpasswd | 17 --------- 2 files changed, 91 deletions(-) delete mode 100644 source3/script/addtosmbpass delete mode 100755 source3/script/convert_smbpasswd (limited to 'source3/script') diff --git a/source3/script/addtosmbpass b/source3/script/addtosmbpass deleted file mode 100644 index bc82851c52..0000000000 --- a/source3/script/addtosmbpass +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/awk -f -# edit the line above to point to your real location of awk interpreter - -# awk program for adding new entries in smbpasswd files -# arguments are account names to add; feed it an existent Samba password -# file on stdin, results will be written on stdout -# -# Michal Jaegermann, michal@ellpspace.math.ualberta.ca, 1995-11-09 - -BEGIN { - me = "addtosmbpass"; - count = ARGC; - FS = ":"; - - if (count == 1) { - print "Usage:", me, - "name1 [name2 ....] < smbpasswd.in > smbpasswd.out"; - ARGV[1] = "/dev/null"; - ARGC = 2; - exit; - } - - for(i = 1; i < count; i++) { - names[ARGV[i]] = " "; - delete ARGV[i]; - } -# sane awk should work simply with 'ARGC = 1', but not every awk -# implementation is sane - big sigh!! - ARGV[1] = "-"; - ARGC = 2; -# -# If you have ypmatch but is not RPC registered (some Linux systems -# for example) comment out the next line. -# "which ypmatch" | getline ypmatch; - if (1 != match(ypmatch, /^\//)) { - ypmatch = ""; - } - pwdf = "/etc/passwd"; -} -#check for names already present in input -{ - print $0; - for(name in names) { - if($1 == name) { - delete names[name]; - } - } -} -END { - fmt = "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:"; - fmt = fmt "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:LCT-00000000:%s:\n"; - for(name in names) { - while ((getline < pwdf) > 0) { - if ($1 == name) { - printf(fmt, $1, $3, $5); - close(pwdf); - notfound = ""; - break; - } - notfound = "n"; - } - $0 = ""; - if (notfound && ypmatch) { -# try to find in NIS databases - command = ypmatch " " name " passwd"; - command | getline; - if (NF > 0) { - printf(fmt, $1, $3, $5); - } - close(command); - } - } -} - diff --git a/source3/script/convert_smbpasswd b/source3/script/convert_smbpasswd deleted file mode 100755 index edb775d3a6..0000000000 --- a/source3/script/convert_smbpasswd +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# -# Convert a Samba 1.9.18 smbpasswd file format into -# a Samba 2.0 smbpasswd file format. -# Read from stdin and write to stdout for simplicity. -# Set the last change time to 0x363F96AD to avoid problems -# with trying to work out how to get the seconds since 1970 -# in awk or the shell. JRA. -# -nawk 'BEGIN {FS=":"} -{ - if( $0 ~ "^#" ) { - print $0 - } else { - printf( "%s:%s:%s:%s:[U ]:LCT-363F96AD:\n", $1, $2, $3, $4); - } -}' -- cgit From fd4c40a00da975e4d6caf924877c695eb02b5982 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 13 Aug 2003 04:11:50 +0000 Subject: Create symlinks for modules that register multiple functions (fixes bug #91 ) (This used to be commit 3000a99b2dc4fbffe4f20b92b22b9658d6620b65) --- source3/script/installmodules.sh | 9 --------- source3/script/linkmodules.sh | 12 ++++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) create mode 100755 source3/script/linkmodules.sh (limited to 'source3/script') diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh index ec5691992d..c80da76368 100755 --- a/source3/script/installmodules.sh +++ b/source3/script/installmodules.sh @@ -24,13 +24,4 @@ for p in $*; do chmod $INSTALLPERMS $LIBDIR/$p2 done - -cat << EOF -====================================================================== -The modules are installed. You may uninstall the modules using the -command "make uninstallmodules" or "make uninstall" to uninstall -binaries, man pages, shell scripts and modules. -====================================================================== -EOF - exit 0 diff --git a/source3/script/linkmodules.sh b/source3/script/linkmodules.sh new file mode 100755 index 0000000000..16a04cc064 --- /dev/null +++ b/source3/script/linkmodules.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +cd "$1" +test -f "$2" || exit 0 + +for I in $3 $4 $5 $6 $7 $8 +do + echo "Linking $I to $2" + ln -s $2 $I +done + +exit 0 -- cgit From ec8b32df568260446b815619815e94a7e1b3fd4e Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Tue, 19 Aug 2003 21:52:33 +0000 Subject: Ignore modules/*.c in make proto (This used to be commit eaf883abc0a35dc648fca497248281ac68246341) --- source3/script/mkproto.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.sh b/source3/script/mkproto.sh index 2bf96c9b41..a82e20d6ac 100755 --- a/source3/script/mkproto.sh +++ b/source3/script/mkproto.sh @@ -25,7 +25,7 @@ header="$1" shift headertmp="$header.$$.tmp~" -proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped'`" +proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped|modules/'" echo creating $header -- cgit From caa5b473904ab2a2591faca9f2ac6c5951012601 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 19 Aug 2003 22:59:45 +0000 Subject: missing backtic (This used to be commit bf271aadcfa77f13754202b8ca04e473be819dde) --- source3/script/mkproto.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.sh b/source3/script/mkproto.sh index a82e20d6ac..19615dc79c 100755 --- a/source3/script/mkproto.sh +++ b/source3/script/mkproto.sh @@ -25,7 +25,7 @@ header="$1" shift headertmp="$header.$$.tmp~" -proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped|modules/'" +proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped|modules/'`" echo creating $header -- cgit From 8bfe26b62db2e671b143d93a5428f8fb64a9df05 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 20 Aug 2003 17:13:38 +0000 Subject: metze's autogenerate patch for version.h (This used to be commit ae452e51b02672a56adf18aa7a7e365eeaba9272) --- source3/script/mkversion.sh | 87 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100755 source3/script/mkversion.sh (limited to 'source3/script') diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh new file mode 100755 index 0000000000..ca39297940 --- /dev/null +++ b/source3/script/mkversion.sh @@ -0,0 +1,87 @@ +#!/bin/sh +# + +VERSION_FILE=$1 +OUTPUT_FILE=$2 + +if test -z "$VERSION_FILE";then + VERSION_FILE="VERSION" +fi + +if test -z "$OUTPUT_FILE";then + OUTPUT_FILE="include/version.h" +fi + +SOURCE_DIR=$3 + +SAMBA_VERSION_MAJOR=`sed -n 's/^SAMBA_VERSION_MAJOR=//p' $SOURCE_DIR$VERSION_FILE` +SAMBA_VERSION_MINOR=`sed -n 's/^SAMBA_VERSION_MINOR=//p' $SOURCE_DIR$VERSION_FILE` +SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` + +SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE` + +SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` + +SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` + +SAMBA_VERSION_BETA_RELEASE=`sed -n 's/^SAMBA_VERSION_BETA_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` + +SAMBA_VERSION_ALPHA_RELEASE=`sed -n 's/^SAMBA_VERSION_ALPHA_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` + +SAMBA_VERSION_TEST_RELEASE=`sed -n 's/^SAMBA_VERSION_TEST_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` + +SAMBA_VERSION_IS_CVS_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_CVS_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE` + +SAMBA_VERSION_VENDOR_SUFFIX=`sed -n 's/^SAMBA_VERSION_VENDOR_SUFFIX=//p' $SOURCE_DIR$VERSION_FILE` + +echo "/* Autogenerated by script/mkversion.sh */" > $OUTPUT_FILE + +echo "#define SAMBA_VERSION_MAJOR ${SAMBA_VERSION_MAJOR}" >> $OUTPUT_FILE +echo "#define SAMBA_VERSION_MINOR ${SAMBA_VERSION_MINOR}" >> $OUTPUT_FILE +echo "#define SAMBA_VERSION_RELEASE ${SAMBA_VERSION_RELEASE}" >> $OUTPUT_FILE + + +SAMBA_VERSION_STRING="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}" + + +if test -n "${SAMBA_VERSION_REVISION}";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}${SAMBA_VERSION_REVISION}" + echo "#define SAMBA_VERSION_REVISION \"${SAMBA_VERSION_REVISION}\"" >> $OUTPUT_FILE +elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}" + echo "#define SAMBA_VERSION_PRE_RELEASE ${SAMBA_VERSION_PRE_RELEASE}" >> $OUTPUT_FILE +elif test -n "${SAMBA_VERSION_RC_RELEASE}";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}rc${SAMBA_VERSION_RC_RELEASE}" + echo "#define SAMBA_VERSION_RC_RELEASE ${SAMBA_VERSION_RC_RELEASE}" >> $OUTPUT_FILE +elif test -n "${SAMBA_VERSION_BETA_RELEASE}";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}beta${SAMBA_VERSION_BETA_RELEASE}" + echo "#define SAMBA_VERSION_BETA_RELEASE ${SAMBA_VERSION_BETA_RELEASE}" >> $OUTPUT_FILE +elif test -n "${SAMBA_VERSION_ALPHA_RELEASE}";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}alpha${SAMBA_VERSION_ALPHA_RELEASE}" + echo "#define SAMBA_VERSION_ALPHA_RELEASE ${SAMBA_VERSION_ALPHA_RELEASE}" >> $OUTPUT_FILE +elif test -n "${SAMBA_VERSION_TEST_RELEASE}";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}test${SAMBA_VERSION_TEST_RELEASE}" + echo "#define SAMBA_VERSION_TEST_RELEASE ${SAMBA_VERSION_TEST_RELEASE}" >> $OUTPUT_FILE +fi + + +if test x"${SAMBA_VERSION_IS_CVS_SNAPSHOT}" = x"yes";then + SAMBA_VERSION_STRING="CVS ${SAMBA_VERSION_STRING}" + echo "#define SAMBA_VERSION_IS_CVS_SNAPSHOT 1" >> $OUTPUT_FILE +fi + +if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then + echo "#define SAMBA_VERSION_VENDOR_SUFFIX ${SAMBA_VERSION_VENDOR_SUFFIX}" >> $OUTPUT_FILE +fi + +echo "#define SAMBA_VERSION_OFFICIAL_STRING \"${SAMBA_VERSION_STRING}\"" >> $OUTPUT_FILE + +echo "#define SAMBA_VERSION_STRING samba_version_string()" >> $OUTPUT_FILE + +echo "$0: 'include/version.h' created for Samba(\"${SAMBA_VERSION_STRING}\")" + +if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then + echo "$0: with VENDOR_SUFFIX = ${SAMBA_VERSION_VENDOR_SUFFIX}" +fi + +exit 0 -- cgit From 6cdfb4aa63c77b01c501ede6af4788d18f287936 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Thu, 21 Aug 2003 08:46:48 +0000 Subject: Ignore only getdate.* in modules/, not the whole directory. Fixes static builds of modules (This used to be commit df6eeca5f6ddd1345d77a0efd64afc0d861d978c) --- source3/script/mkproto.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.sh b/source3/script/mkproto.sh index 19615dc79c..62041c7e33 100755 --- a/source3/script/mkproto.sh +++ b/source3/script/mkproto.sh @@ -25,7 +25,7 @@ header="$1" shift headertmp="$header.$$.tmp~" -proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped|modules/'`" +proto_src="`echo $@ | tr ' ' '\n' | sed -e 's/\.o/\.c/g' | sort | uniq | egrep -v 'ubiqx/|wrapped|modules/getdate'`" echo creating $header -- cgit From f8c388399688d74bae57bdf9d188924038476f93 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 21 Aug 2003 13:05:09 +0000 Subject: remove unneedced script (This used to be commit 9c9cc30093b141d07d79c3cddb2ff663e7a7ac80) --- source3/script/cvslog.pl | 102 ----------------------------------------------- 1 file changed, 102 deletions(-) delete mode 100755 source3/script/cvslog.pl (limited to 'source3/script') diff --git a/source3/script/cvslog.pl b/source3/script/cvslog.pl deleted file mode 100755 index f3d020aa72..0000000000 --- a/source3/script/cvslog.pl +++ /dev/null @@ -1,102 +0,0 @@ -#!/usr/bin/perl -w - -my ( $tag, $filename, $date ); -my ( $tmp, $change_flag ); - -if ( $#ARGV != 2 ) { - - print "Usage: ", $0, " cvstag date file\n"; - exit 1; -} - -$tag = $ARGV[0]; -$date = $ARGV[1]; -$filename = $ARGV[2]; - -print STDERR "$filename\n"; - -open ( CVSLOG, "cvs log -d\"$date\" $filename |" ) || die $!; - -## -## First get the branch revision number -## -undef $revision; -while ( !defined($revision) ) { - if ( eof( \*CVSLOG ) ) { - print STDERR "Premature end of cvs log output!\n"; - exit (1); - } - - $string = ; - chomp( $string ); - - if ( $string =~ /$tag:/ ) { - ( $tmp, $revision ) = split( /:/, $string ); - $revision =~ s/\s+//g; - $revision =~ s/\.0\./\./g; - } -} - -## -## Setup the beginning of the first record -## -$string = ""; -while ( $string !~ /^-+/ ) { - $string = ; - exit(0) if ( eof(\*CVSLOG) ); -} - -## -## Loop starting at the revision number for the entry -## - -while ( $string = ) { - - ($tmp, $entry_rev) = split( /\s+/, $string ); - if ( equal_revision( $revision, $entry_rev ) ) { - if ( ! defined($change_flag) ) { - print "++++++++++++++++++++++++++++++++++++++++++++++++++\n"; - print "## $filename\n"; - print "++\n"; - $change_flag = 1; - } - - while ( $string !~ /^-+/ && !eof(CVSLOG) ) { - print "$string"; - $string = ; - } - } - else { - while ( ($string !~ /^-+/) && !eof(CVSLOG) ) { - $string = ; - } - } -} - -close( CVSLOG ); -exit 0; - -############################################################## -## -sub equal_revision { - my ( $branch, $newfile ) = @_; - my ( $indx ); - my ( @branch_rev, @file_rev ); - - @branch_rev = split( /\./, $branch ); - @file_rev = split( /\./, $newfile ); - - return 0 if ( $#branch_rev != ($#file_rev - 1) ); - - $indx = 0; - while( $indx <= $#branch_rev ) { - if ( $branch_rev[$indx] != $file_rev[$indx] ) { - return 0; - } - $indx++; - } - - return 1; -} - - -- cgit From a1be0fbbb4191cfd9ebc2eaab2f02bda02adf14b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 22 Aug 2003 16:23:56 +0000 Subject: don't complain if the using_samba book is not in the tree (This used to be commit 20603faf2c6e37b1db139cdbbfd4131cb5c33869) --- source3/script/installswat.sh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index d1f8ea191d..300324b077 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -71,13 +71,13 @@ done done -# Install Using Samba book +# Install Using Samba book (but only if it is there) -if [ "x$BOOKDIR" != "x" ]; then +if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; then # Create directories - for d in $BOOKDIR $BOOKDIR/figs $BOOKDIR/gifs; do + for d in $BOOKDIR $BOOKDIR/figs ; do if [ ! -d $d ]; then mkdir $d if [ ! -d $d ]; then @@ -105,15 +105,6 @@ if [ "x$BOOKDIR" != "x" ]; then chmod 0644 $FNAME done - # Gifs - - for f in $SRCDIR../docs/htmldocs/using_samba/gifs/*.gif; do - FNAME=$BOOKDIR/gifs/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME - done - fi cat << EOF -- cgit From e83031c84de410cb19c96a4084b95f26619ce5a9 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Thu, 28 Aug 2003 17:16:27 +0000 Subject: Refactor charset plugins a bit and add CP437 module. Now all 8-bit charsets with gaps (not all symbols defined) could be produced through one macro -- SMB_GENERATE_CHARSET_MODULE_8_BIT_GAP(CHARSETNAME) within source file with three charset tables. Full source code for such modules can be generated by source/script/gen-8bit-gap.sh script which was taken from GNU libc and changed slightly to follow our data types and structure. (This used to be commit 37042c7bc0f349370e93e4bed37d8fa371013247) --- source3/script/.cvsignore | 1 + source3/script/gap.awk | 39 ++++++++++++++++++++++++++++++ source3/script/gaptab.awk | 48 ++++++++++++++++++++++++++++++++++++ source3/script/gen-8bit-gap.sh.in | 51 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 source3/script/gap.awk create mode 100644 source3/script/gaptab.awk create mode 100755 source3/script/gen-8bit-gap.sh.in (limited to 'source3/script') diff --git a/source3/script/.cvsignore b/source3/script/.cvsignore index 7a8114ecd7..0464ca2335 100644 --- a/source3/script/.cvsignore +++ b/source3/script/.cvsignore @@ -1 +1,2 @@ findsmb +gen-8bit-gap.sh diff --git a/source3/script/gap.awk b/source3/script/gap.awk new file mode 100644 index 0000000000..11680d10f9 --- /dev/null +++ b/source3/script/gap.awk @@ -0,0 +1,39 @@ +BEGIN { hv["0"] = 0; hv["1"] = 1; hv["2"] = 2; hv["3"] = 3; + hv["4"] = 4; hv["5"] = 5; hv["6"] = 6; hv["7"] = 7; + hv["8"] = 8; hv["9"] = 9; hv["A"] = 10; hv["B"] = 11; + hv["C"] = 12; hv["D"] = 13; hv["E"] = 14; hv["F"] = 15; + hv["a"] = 10; hv["b"] = 11; hv["c"] = 12; hv["d"] = 13; + hv["e"] = 14; hv["f"] = 15; + + first = 0; last = 0; idx = 0; +} + +function tonum(str) +{ + num=0; + cnt=1; + while (cnt <= length(str)) { + num *= 16; + num += hv[substr(str,cnt,1)]; + ++cnt; + } + return num; +} + +{ + u = tonum($1); + if (u - last > 6) + { + if (last) + { + printf (" { 0x%04x, 0x%04x, %5d },\n", + first, last, idx); + idx -= u - last - 1; + } + first = u; + } + last = u; +} + +END { printf (" { 0x%04x, 0x%04x, %5d },\n", + first, last, idx); } diff --git a/source3/script/gaptab.awk b/source3/script/gaptab.awk new file mode 100644 index 0000000000..f9d1526361 --- /dev/null +++ b/source3/script/gaptab.awk @@ -0,0 +1,48 @@ +BEGIN { hv["0"] = 0; hv["1"] = 1; hv["2"] = 2; hv["3"] = 3; + hv["4"] = 4; hv["5"] = 5; hv["6"] = 6; hv["7"] = 7; + hv["8"] = 8; hv["9"] = 9; hv["A"] = 10; hv["B"] = 11; + hv["C"] = 12; hv["D"] = 13; hv["E"] = 14; hv["F"] = 15; + hv["a"] = 10; hv["b"] = 11; hv["c"] = 12; hv["d"] = 13; + hv["e"] = 14; hv["f"] = 15; + + first = 0; last = 0; idx = 0; f = 0; +} + +function tonum(str) +{ + num=0; + cnt=1; + while (cnt <= length(str)) { + num *= 16; + num += hv[substr(str,cnt,1)]; + ++cnt; + } + return num; +} + +function fmt(val) +{ + if (f++ % 8 == 0) + { printf ("\n '\\x%02x',", val); } + else + { printf (" '\\x%02x',", val); } +} + +{ + u = tonum($1); c = tonum($2); + + if (u - last > 6) + { + if (last) { idx += last - first + 1; } + first = u; + } + else + { + for (m = last+1; m < u; m++) { fmt(0); } + } + + fmt(c); + last = u; +} + +END { print "" } diff --git a/source3/script/gen-8bit-gap.sh.in b/source3/script/gen-8bit-gap.sh.in new file mode 100755 index 0000000000..e66c654c22 --- /dev/null +++ b/source3/script/gen-8bit-gap.sh.in @@ -0,0 +1,51 @@ +#!/bin/sh +if test $# -ne 2 ; then + echo "Usage: $0 " + 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] = {" +sed -ne '/^[^[:space:]]*[[:space:]]*.x00/d' \ + -e 's/^[[:space:]]*.x\(..\).*/ [0x\2] = 0x\1,/p' \ + "$CHARMAP" | sort -u +echo "};" +echo +echo "static const struct charset_gap_table from_idx[] = {" +sed -ne 's/^[[:space:]]*.x\(..\).*/\1 \2/p' \ + "$CHARMAP" | sort -u | @AWK@ -f @srcdir@/script/gaptab.awk +echo "};" +echo +echo "SMB_GENERATE_CHARSET_MODULE_8_BIT_GAP($CHARSETNAME)" +echo -- cgit From 9809c98f24b53e6b34d80bd7abcf439f4c0e6ec6 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 28 Aug 2003 21:23:04 +0000 Subject: make sure using_samba 2ed. files get installed ok (This used to be commit 55b6129bd106898ebfe976facacfe1d079492993) --- source3/script/installswat.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 300324b077..bd2f8da234 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -96,6 +96,13 @@ if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; th chmod 0644 $FNAME done + for f in $SRCDIR../docs/htmldocs/using_samba/*.gif; do + FNAME=$BOOKDIR/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done + # Figures for f in $SRCDIR../docs/htmldocs/using_samba/figs/*.gif; do -- cgit From 39abb5caccc47ce6f16c3a0995e948076a314bf5 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Mon, 1 Sep 2003 11:33:42 +0000 Subject: Proper fix for #380 -- use different algorithm to generate codepages source code which allows to take gaps into account thus making unneccessary extended [index] = value, syntax in to_ucs2 array (This used to be commit 4ab08a4bb8dbd023eb85d16a594d3c4ed066f9ac) --- source3/script/gen-8bit-gap.awk | 18 ++++++++++++++++++ source3/script/gen-8bit-gap.sh.in | 4 +--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 source3/script/gen-8bit-gap.awk (limited to 'source3/script') diff --git a/source3/script/gen-8bit-gap.awk b/source3/script/gen-8bit-gap.awk new file mode 100644 index 0000000000..59a1a23be0 --- /dev/null +++ b/source3/script/gen-8bit-gap.awk @@ -0,0 +1,18 @@ +BEGIN { + for (i=0; i<256; i++) { + tbl[sprintf("%02x",i)] = "0x0000"; + } +} + +/^[[:space:]]*.x([[:xdigit:]][[:xdigit:]])[:space:]*.*$/ { + tbl[substr($2,3,2)]=sprintf("0x%s",substr($1,3,4)); +} + +END { + for(i=0; i<32; i++) { + for(j=0; j<8; j++) { + printf(" %s,", tbl[sprintf("%02x",i*8+j)]); + } + printf "\n" + } +} \ No newline at end of file diff --git a/source3/script/gen-8bit-gap.sh.in b/source3/script/gen-8bit-gap.sh.in index e66c654c22..bcf64a4464 100755 --- a/source3/script/gen-8bit-gap.sh.in +++ b/source3/script/gen-8bit-gap.sh.in @@ -31,9 +31,7 @@ echo " */" echo '#include "includes.h"' echo echo "static const uint16 to_ucs2[256] = {" -sed -ne '/^[^[:space:]]*[[:space:]]*.x00/d' \ - -e 's/^[[:space:]]*.x\(..\).*/ [0x\2] = 0x\1,/p' \ - "$CHARMAP" | sort -u +cat "$CHARMAP" | @AWK@ -f @srcdir@/script/gen-8bit-gap.awk echo "};" echo echo "static const struct charset_gap_table from_idx[] = {" -- cgit From 7444f0fc7b946dff9156d9a35a915ce8bf2e7733 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 4 Sep 2003 23:55:44 +0000 Subject: Removed {OLD,NEW}_NTDOMAIN cruft from mkproto.awk (This used to be commit 061decb608a3c881e646617b623277895fc0c13e) --- source3/script/mkproto.awk | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 6a45a70cc3..b6e911699e 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -41,20 +41,6 @@ END { } } -# special handling for code merge of TNG to head -/^#define OLD_NTDOMAIN 1/ { - printf "#if OLD_NTDOMAIN\n" -} -/^#undef OLD_NTDOMAIN/ { - printf "#endif\n" -} -/^#define NEW_NTDOMAIN 1/ { - printf "#if NEW_NTDOMAIN\n" -} -/^#undef NEW_NTDOMAIN/ { - printf "#endif\n" -} - # we handle the loadparm.c fns separately /^FN_LOCAL_BOOL/ { -- cgit From 605caa4172d058c33e96ac8033fedca311a75e34 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 5 Sep 2003 13:07:41 +0000 Subject: fix some problems with the findsmb script due to changes in smbclient & nmblookup (This used to be commit 50bb063f3ba0ce0f336bd9f1af3090839ee7b118) --- source3/script/findsmb.in | 60 ++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 29 deletions(-) (limited to 'source3/script') diff --git a/source3/script/findsmb.in b/source3/script/findsmb.in index 6276bd3f39..5a8e86d722 100755 --- a/source3/script/findsmb.in +++ b/source3/script/findsmb.in @@ -44,7 +44,7 @@ sub ipsort # do numeric sort on last field of IP address # look for all machines that respond to a name lookup -open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*'|") || +open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*' --debuglevel=0|") || die("Can't run nmblookup '*'.\n"); # get rid of all lines that are not a response IP address, @@ -63,7 +63,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found # find the netbios names registered by each machine - open(NMBLOOKUP,"$SAMBABIN/nmblookup $R_OPTION -A $ip|") || + open(NMBLOOKUP,"$SAMBABIN/nmblookup $R_OPTION -A $ip --debuglevel=0|") || die("Can't get nmb name list.\n"); @nmblookup = ; close NMBLOOKUP; @@ -89,35 +89,37 @@ foreach $ip (@ipaddrs) # loop through each IP address found # do an smbclient command on the netbios name. - open(SMB,"$SAMBABIN/smbclient -N -L $name -I $ip -U% |") || - die("Can't do smbclient command.\n"); - @smb = ; - close SMB; + if ( "$name" ) { + open(SMB,"$SAMBABIN/smbclient -L $name -I $ip -N --debuglevel=1 2>&1 |") || + die("Can't do smbclient command.\n"); + @smb = ; + close SMB; - if ($DEBUG) { # if -d flag print results of nmblookup and smbclient - print "===============================================================\n"; - print @nmblookup; - print @smb; - } - -# look for the OS= string - - @info = grep(/OS=/,@smb); - $_ = @info[0]; - if ($_) { # we found response - s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter - - } else { # no OS= string in response (WIN95 client) + if ($DEBUG) { # if -d flag print results of nmblookup and smbclient + print "===============================================================\n"; + #print @nmblookup; + print @smb; + } -# for WIN95 clients get workgroup name from nmblookup response - @name = grep(/<00> - /,@nmblookup); - $_ = @name[0]; - if ($_) { -# Same as before for space and characters - /(.{1,15})\s+<00>\s+/; - $_ = "[$1]"; - } else { - $_ = "Unknown Workgroup"; + # look for the OS= string + + @info = grep(/OS=/,@smb); + $_ = @info[0]; + if ($_) { # we found response + s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter + + } else { # no OS= string in response (WIN95 client) + + # for WIN95 clients get workgroup name from nmblookup response + @name = grep(/<00> - /,@nmblookup); + $_ = @name[0]; + if ($_) { + # Same as before for space and characters + /(.{1,15})\s+<00>\s+/; + $_ = "[$1]"; + } else { + $_ = "Unknown Workgroup"; + } } } -- cgit From 2d5cf1d4513df9f3eaf20a2eae930858c5d3f554 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 5 Sep 2003 13:21:35 +0000 Subject: reformatting (This used to be commit 5c3094ee5558a85b9e688aca8044f228ec6fbb33) --- source3/script/findsmb.in | 209 ++++++++++++++++++++++++---------------------- 1 file changed, 107 insertions(+), 102 deletions(-) (limited to 'source3/script') diff --git a/source3/script/findsmb.in b/source3/script/findsmb.in index 5a8e86d722..64215918d1 100755 --- a/source3/script/findsmb.in +++ b/source3/script/findsmb.in @@ -23,29 +23,33 @@ $SAMBABIN = "@prefix@/bin"; for ($i = 0; $i < 2; $i++) { # test for -d and -r options - $_ = shift; - if (m/-d|-D/) { - $DEBUG = 1; - } elsif (m/-r/) { - $R_OPTION = "-r"; - } + $_ = shift; + if (m/-d|-D/) { + $DEBUG = 1; + } elsif (m/-r/) { + $R_OPTION = "-r"; + } } if ($_) { # set broadcast address if it was specified - $BCAST = "-B $_"; + $BCAST = "-B $_"; } -sub ipsort # do numeric sort on last field of IP address + +###################################################################### +# do numeric sort on last field of IP address +sub ipsort { - @t1 = split(/\./,$a); - @t2 = split(/\./,$b); - @t1[3] <=> @t2[3]; + @t1 = split(/\./,$a); + @t2 = split(/\./,$b); + @t1[3] <=> @t2[3]; } +###################################################################### # look for all machines that respond to a name lookup open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*' --debuglevel=0|") || - die("Can't run nmblookup '*'.\n"); + die("Can't run nmblookup '*'.\n"); # get rid of all lines that are not a response IP address, # strip everything but IP address and sort by last field in address @@ -59,96 +63,97 @@ print "---------------------------------------------------------------------\n"; foreach $ip (@ipaddrs) # loop through each IP address found { - $ip =~ s/\n//; # strip newline from IP address - -# find the netbios names registered by each machine - - open(NMBLOOKUP,"$SAMBABIN/nmblookup $R_OPTION -A $ip --debuglevel=0|") || - die("Can't get nmb name list.\n"); - @nmblookup = ; - close NMBLOOKUP; - -# get the first <00> name - - @name = grep(/<00>/,@nmblookup); - $_ = @name[0]; - if ($_) { # we have a netbios name - if (/GROUP/) { # is it a group name - ($name, $aliases, $type, $length, @addresses) = - gethostbyaddr(pack('C4',split('\.',$ip)),2); - if (! $name) { # could not get name - $name = "unknown nis name"; + $ip =~ s/\n//; # strip newline from IP address + + # find the netbios names registered by each machine + + open(NMBLOOKUP,"$SAMBABIN/nmblookup $R_OPTION -A $ip --debuglevel=0|") || + die("Can't get nmb name list.\n"); + @nmblookup = ; + close NMBLOOKUP; + + # get the first <00> name + + @name = grep(/<00>/,@nmblookup); + $_ = @name[0]; + + if ($_) { # we have a netbios name + if (/GROUP/) { # is it a group name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + } else { + # The Netbios name can contain lot of characters also '<' '>' + # and spaces. The follwing cure inside name space but not + # names starting or ending with spaces + /(.{1,15})\s+<00>\s+/; + $name = $1; + } + + # do an smbclient command on the netbios name. + + if ( "$name" ) { + open(SMB,"$SAMBABIN/smbclient -L $name -I $ip -N --debuglevel=1 2>&1 |") || + die("Can't do smbclient command.\n"); + @smb = ; + close SMB; + + if ($DEBUG) { # if -d flag print results of nmblookup and smbclient + print "===============================================================\n"; + print @nmblookup; + print @smb; + } + + # look for the OS= string + + @info = grep(/OS=/,@smb); + $_ = @info[0]; + if ($_) { # we found response + s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter + + } else { # no OS= string in response (WIN95 client) + + # for WIN95 clients get workgroup name from nmblookup response + @name = grep(/<00> - /,@nmblookup); + $_ = @name[0]; + if ($_) { + # Same as before for space and characters + /(.{1,15})\s+<00>\s+/; + $_ = "[$1]"; + } else { + $_ = "Unknown Workgroup"; + } + } + } + + # see if machine registered a local master browser name + if (grep(/<1d>/,@nmblookup)) { + $master = '+'; # indicate local master browser + if (grep(/<1b>/,@nmblookup)) { # how about domain master browser? + $master = '*'; # indicate domain master browser + } + } else { + $master = ' '; # not a browse master + } + + # line up info in 3 columns + + print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n"; + + } else { # no netbios name found + # try getting the host name + ($name, $aliases, $type, $length, @addresses) = + gethostbyaddr(pack('C4',split('\.',$ip)),2); + if (! $name) { # could not get name + $name = "unknown nis name"; + } + if ($DEBUG) { # if -d flag print results of nmblookup + print "===============================================================\n"; + print @nmblookup; + } + print "$ip".' 'x(16-length($ip))."$name\n"; } - } else { -# The Netbios name can contain lot of characters also '<' '>' -# and spaces. The follwing cure inside name space but not -# names starting or ending with spaces - /(.{1,15})\s+<00>\s+/; - $name = $1; - } - -# do an smbclient command on the netbios name. - - if ( "$name" ) { - open(SMB,"$SAMBABIN/smbclient -L $name -I $ip -N --debuglevel=1 2>&1 |") || - die("Can't do smbclient command.\n"); - @smb = ; - close SMB; - - if ($DEBUG) { # if -d flag print results of nmblookup and smbclient - print "===============================================================\n"; - #print @nmblookup; - print @smb; - } - - # look for the OS= string - - @info = grep(/OS=/,@smb); - $_ = @info[0]; - if ($_) { # we found response - s/Domain=|OS=|Server=|\n//g; # strip out descriptions to make line shorter - - } else { # no OS= string in response (WIN95 client) - - # for WIN95 clients get workgroup name from nmblookup response - @name = grep(/<00> - /,@nmblookup); - $_ = @name[0]; - if ($_) { - # Same as before for space and characters - /(.{1,15})\s+<00>\s+/; - $_ = "[$1]"; - } else { - $_ = "Unknown Workgroup"; - } - } - } - -# see if machine registered a local master browser name - if (grep(/<1d>/,@nmblookup)) { - $master = '+'; # indicate local master browser - if (grep(/<1b>/,@nmblookup)) { # how about domain master browser? - $master = '*'; # indicate domain master browser - } - } else { - $master = ' '; # not a browse master - } - -# line up info in 3 columns - - print "$ip".' 'x(16-length($ip))."$name".' 'x(14-length($name))."$master"."$_\n"; - - } else { # no netbios name found -# try getting the host name - ($name, $aliases, $type, $length, @addresses) = - gethostbyaddr(pack('C4',split('\.',$ip)),2); - if (! $name) { # could not get name - $name = "unknown nis name"; - } - if ($DEBUG) { # if -d flag print results of nmblookup - print "===============================================================\n"; - print @nmblookup; - } - print "$ip".' 'x(16-length($ip))."$name\n"; - } } -- cgit From 1f32535d6093ad864f84e549410c666d5e314627 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 5 Sep 2003 13:25:49 +0000 Subject: fix some output formatting (This used to be commit 0283b0152e4cbe3d26b305ab9867e2b0765addfe) --- source3/script/findsmb.in | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/script') diff --git a/source3/script/findsmb.in b/source3/script/findsmb.in index 64215918d1..fb06018fe5 100755 --- a/source3/script/findsmb.in +++ b/source3/script/findsmb.in @@ -90,6 +90,7 @@ foreach $ip (@ipaddrs) # loop through each IP address found # names starting or ending with spaces /(.{1,15})\s+<00>\s+/; $name = $1; + $name =~ s/^\s+//g; } # do an smbclient command on the netbios name. -- cgit From 5715e01481bac7ff8ae4c79c4b7e76b42076f933 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Wed, 17 Sep 2003 17:49:35 +0000 Subject: Fix scripts to generate correct tables for compilers which have character constants as signed chars instead of unsigned (This used to be commit e4dda8cb222bc3a971088897e47bd8e249cd0188) --- source3/script/gaptab.awk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/gaptab.awk b/source3/script/gaptab.awk index f9d1526361..a309089cd5 100644 --- a/source3/script/gaptab.awk +++ b/source3/script/gaptab.awk @@ -23,9 +23,9 @@ function tonum(str) function fmt(val) { if (f++ % 8 == 0) - { printf ("\n '\\x%02x',", val); } + { printf ("\n 0x%02x,", val); } else - { printf (" '\\x%02x',", val); } + { printf (" 0x%02x,", val); } } { -- cgit From a6b3104042ee0f07af77753b0e8a6e49add52150 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 24 Sep 2003 01:27:39 +0000 Subject: Fix bug #456 for 3.0.0 release. More work on SWAT i18n support to appear in later releases. (This used to be commit c3267749054ade219d214bdaf6c21e4207bd2011) --- source3/script/installmsg.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 source3/script/installmsg.sh (limited to 'source3/script') diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh new file mode 100644 index 0000000000..30ad404aa0 --- /dev/null +++ b/source3/script/installmsg.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# first version (Sept 2003) written by Shiro Yamada +# based on the first verion (March 2002) of installdat.sh written by Herb Lewis + +MSGDIR=$1 +SRCDIR=$2/ + +echo Installing msg files in $MSGDIR + +for f in $SRCDIR/po/*.msg; do + FNAME=$MSGDIR/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME +done + +cat << EOF +====================================================================== +The msg files have been installed. +====================================================================== +EOF + +exit 0 -- cgit From a234b822d4adf22df00349905401deb4349935ac Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 2 Oct 2003 21:22:58 +0000 Subject: fixed for /sbin/mount.smbfs link when using $DESTDIR; bug 525 (This used to be commit dc6d14c2bd1a8509e40c198065b8dc930c37d3ed) --- source3/script/installbin.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh index c2f34082dd..fe3bc4c48a 100755 --- a/source3/script/installbin.sh +++ b/source3/script/installbin.sh @@ -1,10 +1,12 @@ #!/bin/sh INSTALLPERMS=$1 -BASEDIR=$2 -BINDIR=$3 -LIBDIR=$4 -VARDIR=$5 +DESTDIR=$2 +BASEDIR=$3 +BINDIR=$4 +LIBDIR=$5 +VARDIR=$6 +shift shift shift shift @@ -23,7 +25,10 @@ for p in $*; do # this is a special case, mount needs this in a specific location if [ $p2 = smbmount ]; then - ln -sf $BINDIR/$p2 /sbin/mount.smbfs + if [ ! -d $DESTDIR/sbin ]; then + mkdir $DESTDIR/sbin + fi + ln -sf $BINDIR/$p2 $DESTDIR/sbin/mount.smbfs fi done -- cgit From b1f610ebb1ba1e6ae0f0e9fbbc703f6a4af68b67 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 6 Oct 2003 01:38:46 +0000 Subject: split some security related functions in their own files. (no need to include all of smbd files to use some basic sec functions) also minor compile fixes couldn't compile to test these due to some kerberos problems wirh 3.0, but on HEAD they're working well, so I suppose it's ok to commit (This used to be commit c78f2d0bd15ecd2ba643bb141cc35a3405787aa1) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index b6e911699e..3835ea3af3 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -120,7 +120,7 @@ END { gotstart = 1; } - if( $0 ~ /^ADS_STRUCT|^ADS_STATUS|^DATA_BLOB|^ASN1_DATA|^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT/ ) { + if( $0 ~ /^ADS_STRUCT|^ADS_STATUS|^DATA_BLOB|^ASN1_DATA|^TDB_CONTEXT|^TDB_DATA|^smb_ucs2_t|^TALLOC_CTX|^hash_element|^NT_DEVICEMODE|^enum.*\(|^NT_USER_TOKEN|^SAM_ACCOUNT|^NTTIME/ ) { gotstart = 1; } -- cgit From 629120a0a1ee0726cf6f43bf841ca042d2b0229e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 6 Oct 2003 19:24:17 +0000 Subject: cosmetic fix when DESTDIR=/ (default) (This used to be commit e660b5752aa129c49b0b665845de2fe4c160be00) --- source3/script/installbin.sh | 8 ++++---- source3/script/installdat.sh | 2 +- source3/script/installdirs.sh | 8 +++++--- source3/script/installman.sh | 2 +- source3/script/installmodules.sh | 4 ++-- source3/script/installmsg.sh | 2 +- source3/script/installscripts.sh | 2 +- source3/script/installswat.sh | 2 +- source3/script/uninstallbin.sh | 8 ++++---- source3/script/uninstallman.sh | 2 +- source3/script/uninstallmodules.sh | 4 ++-- source3/script/uninstallscripts.sh | 2 +- 12 files changed, 24 insertions(+), 22 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh index fe3bc4c48a..f9fd5298c0 100755 --- a/source3/script/installbin.sh +++ b/source3/script/installbin.sh @@ -2,10 +2,10 @@ INSTALLPERMS=$1 DESTDIR=$2 -BASEDIR=$3 -BINDIR=$4 -LIBDIR=$5 -VARDIR=$6 +BASEDIR=`echo $3 | sed 's/\/\//\//g'` +BINDIR=`echo $4 | sed 's/\/\//\//g'` +LIBDIR=`echo $5 | sed 's/\/\//\//g'` +VARDIR=`echo $6 | sed 's/\/\//\//g'` shift shift shift diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh index 7ff88ac788..4a5b1de5dc 100755 --- a/source3/script/installdat.sh +++ b/source3/script/installdat.sh @@ -1,7 +1,7 @@ #!/bin/sh #fist version March 2002, Herb Lewis -DATDIR=$1 +DATDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2/ echo Installing dat files in $DATDIR diff --git a/source3/script/installdirs.sh b/source3/script/installdirs.sh index 9557b86d3b..1db46b82ff 100755 --- a/source3/script/installdirs.sh +++ b/source3/script/installdirs.sh @@ -1,11 +1,13 @@ #!/bin/sh while ( test -n "$1" ); do - if [ ! -d $1 ]; then - mkdir -p $1 + + DIRNAME=`echo $1 | sed 's/\/\//\//g'` + if [ ! -d $DIRNAME ]; then + mkdir -p $DIRNAME fi - if [ ! -d $1 ]; then + if [ ! -d $DIRNAME ]; then echo Failed to make directory $1 exit 1 fi diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 5b6bba69ed..c7a8f45095 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -5,7 +5,7 @@ # modified to accomodate international man pages (inspired # by Japanese edition's approach) -MANDIR=$1 +MANDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2/ langs=$3 diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh index c80da76368..f7c7473338 100755 --- a/source3/script/installmodules.sh +++ b/source3/script/installmodules.sh @@ -1,8 +1,8 @@ #!/bin/sh INSTALLPERMS=$1 -BASEDIR=$2 -LIBDIR=$3 +BASEDIR=`echo $2 | sed 's/\/\//\//g'` +LIBDIR=`echo $3 | sed 's/\/\//\//g'` shift shift shift diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh index 30ad404aa0..5a41fe1ca8 100644 --- a/source3/script/installmsg.sh +++ b/source3/script/installmsg.sh @@ -2,7 +2,7 @@ # first version (Sept 2003) written by Shiro Yamada # based on the first verion (March 2002) of installdat.sh written by Herb Lewis -MSGDIR=$1 +MSGDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2/ echo Installing msg files in $MSGDIR diff --git a/source3/script/installscripts.sh b/source3/script/installscripts.sh index bff5423e7c..81608c3682 100755 --- a/source3/script/installscripts.sh +++ b/source3/script/installscripts.sh @@ -3,7 +3,7 @@ # 5 July 96 Dan.Shearer@UniSA.Edu.Au Don't hardcode script names, get from Make INSTALLPERMS=$1 -BINDIR=$2 +BINDIR=`echo $2 | sed 's/\/\//\//g'` shift shift diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index bd2f8da234..7841a2a7b5 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -1,7 +1,7 @@ #!/bin/sh #first version March 1998, Andrew Tridgell -SWATDIR=$1 +SWATDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2/ BOOKDIR=$SWATDIR/using_samba diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh index a8bbdea7af..5de936fccf 100755 --- a/source3/script/uninstallbin.sh +++ b/source3/script/uninstallbin.sh @@ -2,10 +2,10 @@ #4 July 96 Dan.Shearer@UniSA.edu.au INSTALLPERMS=$1 -BASEDIR=$2 -BINDIR=$3 -LIBDIR=$4 -VARDIR=$5 +BASEDIR=`echo $2 | sed 's/\/\//\//g'` +BINDIR=`echo $3 | sed 's/\/\//\//g'` +LIBDIR=`echo $4 | sed 's/\/\//\//g'` +VARDIR=`echo $5 | sed 's/\/\//\//g'` shift shift shift diff --git a/source3/script/uninstallman.sh b/source3/script/uninstallman.sh index 3126709831..0fea11cd1b 100755 --- a/source3/script/uninstallman.sh +++ b/source3/script/uninstallman.sh @@ -6,7 +6,7 @@ # by Japanese edition's approach) -MANDIR=$1 +MANDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2 langs=$3 diff --git a/source3/script/uninstallmodules.sh b/source3/script/uninstallmodules.sh index 30582a39fa..ac83af3dc9 100755 --- a/source3/script/uninstallmodules.sh +++ b/source3/script/uninstallmodules.sh @@ -2,8 +2,8 @@ #4 July 96 Dan.Shearer@UniSA.edu.au INSTALLPERMS=$1 -BASEDIR=$2 -LIBDIR=$3 +BASEDIR=`echo $2 | sed 's/\/\//\//g'` +LIBDIR=`echo $3 | sed 's/\/\//\//g'` shift shift shift diff --git a/source3/script/uninstallscripts.sh b/source3/script/uninstallscripts.sh index 13104acedd..cf7fd71999 100755 --- a/source3/script/uninstallscripts.sh +++ b/source3/script/uninstallscripts.sh @@ -2,7 +2,7 @@ # 5 July 96 Dan.Shearer@UniSA.Edu.Au - almost identical to uninstallbin.sh INSTALLPERMS=$1 -BINDIR=$2 +BINDIR=`echo $2 | sed 's/\/\//\//g'` shift shift -- cgit From f95e40197f7d1f882796de9ed83e61d79b21f256 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Tue, 4 Nov 2003 19:47:40 +0000 Subject: Generate 64-bit clean printf's for build options. (This used to be commit 1814c29b7d5c2ab25f209fba0afb5c6d175a87d1) --- source3/script/mkbuildoptions.awk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkbuildoptions.awk b/source3/script/mkbuildoptions.awk index cdc5bd9881..e47664add4 100644 --- a/source3/script/mkbuildoptions.awk +++ b/source3/script/mkbuildoptions.awk @@ -242,14 +242,14 @@ END { # add code to display the various type sizes print " /* Output the sizes of the various types */"; print " output(screen, \"\\nType sizes:\\n\");"; - print " output(screen, \" sizeof(char): %u\\n\",sizeof(char));"; - print " output(screen, \" sizeof(int): %u\\n\",sizeof(int));"; - print " output(screen, \" sizeof(long): %u\\n\",sizeof(long));"; - print " output(screen, \" sizeof(uint8): %u\\n\",sizeof(uint8));"; - print " output(screen, \" sizeof(uint16): %u\\n\",sizeof(uint16));"; - print " output(screen, \" sizeof(uint32): %u\\n\",sizeof(uint32));"; - print " output(screen, \" sizeof(short): %u\\n\",sizeof(short));"; - print " output(screen, \" sizeof(void*): %u\\n\",sizeof(void*));"; + print " output(screen, \" sizeof(char): %lu\\n\",sizeof(char));"; + print " output(screen, \" sizeof(int): %lu\\n\",sizeof(int));"; + print " output(screen, \" sizeof(long): %lu\\n\",sizeof(long));"; + print " output(screen, \" sizeof(uint8): %lu\\n\",sizeof(uint8));"; + print " output(screen, \" sizeof(uint16): %lu\\n\",sizeof(uint16));"; + print " output(screen, \" sizeof(uint32): %lu\\n\",sizeof(uint32));"; + print " output(screen, \" sizeof(short): %lu\\n\",sizeof(short));"; + print " output(screen, \" sizeof(void*): %lu\\n\",sizeof(void*));"; ################################################## # add code to give information about modules -- cgit From 9f154119e8788e9c3525b0a61c64326abd35bdf6 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Thu, 6 Nov 2003 22:11:08 +0000 Subject: Final round of printf warnings fixes for the moment. (This used to be commit 0519a7022b4979c0e8ddd4907f4b858a59299c06) --- source3/script/mkbuildoptions.awk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkbuildoptions.awk b/source3/script/mkbuildoptions.awk index e47664add4..9c22662310 100644 --- a/source3/script/mkbuildoptions.awk +++ b/source3/script/mkbuildoptions.awk @@ -242,14 +242,14 @@ END { # add code to display the various type sizes print " /* Output the sizes of the various types */"; print " output(screen, \"\\nType sizes:\\n\");"; - print " output(screen, \" sizeof(char): %lu\\n\",sizeof(char));"; - print " output(screen, \" sizeof(int): %lu\\n\",sizeof(int));"; - print " output(screen, \" sizeof(long): %lu\\n\",sizeof(long));"; - print " output(screen, \" sizeof(uint8): %lu\\n\",sizeof(uint8));"; - print " output(screen, \" sizeof(uint16): %lu\\n\",sizeof(uint16));"; - print " output(screen, \" sizeof(uint32): %lu\\n\",sizeof(uint32));"; - print " output(screen, \" sizeof(short): %lu\\n\",sizeof(short));"; - print " output(screen, \" sizeof(void*): %lu\\n\",sizeof(void*));"; + print " output(screen, \" sizeof(char): %lu\\n\",(unsigned long)sizeof(char));"; + print " output(screen, \" sizeof(int): %lu\\n\",(unsigned long)sizeof(int));"; + print " output(screen, \" sizeof(long): %lu\\n\",(unsigned long)sizeof(long));"; + print " output(screen, \" sizeof(uint8): %lu\\n\",(unsigned long)sizeof(uint8));"; + print " output(screen, \" sizeof(uint16): %lu\\n\",(unsigned long)sizeof(uint16));"; + print " output(screen, \" sizeof(uint32): %lu\\n\",(unsigned long)sizeof(uint32));"; + print " output(screen, \" sizeof(short): %lu\\n\",(unsigned long)sizeof(short));"; + print " output(screen, \" sizeof(void*): %lu\\n\",(unsigned long)sizeof(void*));"; ################################################## # add code to give information about modules -- cgit From 6ebde91c44402f830b5887f11037b6fa625c16bc Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 7 Nov 2003 23:04:06 +0000 Subject: * only install swat html files once * revert the change that prevent the guest account from being added to a passdb backend since it broke the build farm. * apply patch from Alex Deiter to fix the "smbldap_open: cannot access when not root error" messages when looking up group information (bug 281) (This used to be commit 9b8bf6a950186bd95abe952af4a7d35829b34ff8) --- source3/script/installswat.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 7841a2a7b5..be0cdf3eef 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -28,16 +28,16 @@ done # Install images for ln in $LANGS; do -for f in $SRCDIR../swat/$ln/images/*.gif; do + for f in $SRCDIR../swat/$ln/images/*.gif; do FNAME=$SWATDIR/$ln/images/`basename $f` echo $FNAME cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? chmod 0644 $FNAME -done + done -# Install html help + # Install html help -for f in $SRCDIR../swat/$ln/help/*.html; do + for f in $SRCDIR../swat/$ln/help/*.html; do FNAME=$SWATDIR/$ln/help/`basename $f` echo $FNAME if [ "x$BOOKDIR" = "x" ]; then @@ -49,28 +49,28 @@ for f in $SRCDIR../swat/$ln/help/*.html; do cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? rm -f $f chmod 0644 $FNAME -done + done -# Install html documentation + # Install "server-side" includes -for f in $SRCDIR../docs/htmldocs/*.html; do - FNAME=$SWATDIR/help/`basename $f` + for f in $SRCDIR../swat/$ln/include/*.html; do + FNAME=$SWATDIR/$ln/include/`basename $f` echo $FNAME cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? chmod 0644 $FNAME + done + done -# Install "server-side" includes +# Install html documentation -for f in $SRCDIR../swat/$ln/include/*.html; do - FNAME=$SWATDIR/$ln/include/`basename $f` +for f in $SRCDIR../docs/htmldocs/*.html; do + FNAME=$SWATDIR/help/`basename $f` echo $FNAME cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? chmod 0644 $FNAME done -done - # Install Using Samba book (but only if it is there) if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; then -- cgit From daea4804c3fcfa18ec95b3979ad7f7970a273642 Mon Sep 17 00:00:00 2001 From: Rafal Szczesniak Date: Wed, 12 Nov 2003 13:02:25 +0000 Subject: Omit html documentation tree because it has been moved to the separate module. Install though, in case one recreates the tree as it was before. rafal (This used to be commit d6857d191ca5aa24f791880e517b0e8db3d587eb) --- source3/script/installswat.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index be0cdf3eef..7ac675de10 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -62,14 +62,17 @@ for ln in $LANGS; do done -# Install html documentation +# Install html documentation (if html documentation tree is here) -for f in $SRCDIR../docs/htmldocs/*.html; do - FNAME=$SWATDIR/help/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME -done +if [ -d $SRCDIR../docs/htmldocs/ ]; then + + for f in $SRCDIR../docs/htmldocs/*.html; do + FNAME=$SWATDIR/help/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done +fi # Install Using Samba book (but only if it is there) -- cgit From 5c8b533638f5a438928d5e4d3d0122d82762cdf3 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 10 Dec 2003 14:10:26 +0000 Subject: patch from TAKEDA yasuma to bypass any missing language files (This used to be commit a3b0cc9f5b230cc4b9a017c9566b2ef83fb54030) --- source3/script/installswat.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 7ac675de10..c0285bda55 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -29,6 +29,9 @@ done for ln in $LANGS; do for f in $SRCDIR../swat/$ln/images/*.gif; do + if [ ! -f $f ] ; then + continue + fi FNAME=$SWATDIR/$ln/images/`basename $f` echo $FNAME cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? @@ -38,6 +41,9 @@ for ln in $LANGS; do # Install html help for f in $SRCDIR../swat/$ln/help/*.html; do + if [ ! -f $f ] ; then + continue + fi FNAME=$SWATDIR/$ln/help/`basename $f` echo $FNAME if [ "x$BOOKDIR" = "x" ]; then @@ -54,6 +60,9 @@ for ln in $LANGS; do # Install "server-side" includes for f in $SRCDIR../swat/$ln/include/*.html; do + if [ ! -f $f ] ; then + continue + fi FNAME=$SWATDIR/$ln/include/`basename $f` echo $FNAME cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? -- cgit From ad40c8a1f4ba99b1cbafb9218994c4dc2447187b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 15 Jan 2004 17:18:39 +0000 Subject: BUG 958; don't use the -N option when invoking smbclient from the smbtar script (This used to be commit c51eaec4f09d9c191c6b24dadb1d12770b368da0) --- source3/script/smbtar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/smbtar b/source3/script/smbtar index f062cba9f0..67a794553c 100644 --- a/source3/script/smbtar +++ b/source3/script/smbtar @@ -161,5 +161,5 @@ fi tarargs=${tarargs}${blocksizearg}${newerarg} eval $SMBCLIENT "'\\\\$server\\$service'" "'$password'" -U "'$username'" \ --E -N $log -D "'$cdcmd'" ${clientargs} \ +-E $log -D "'$cdcmd'" ${clientargs} \ -T${tarcmd}${tarargs} $blocksize $newer $tapefile '${1+"$@"}' $verbose -- cgit From f5bb18bfcb18e8eef7d98a4b84cd7e3183aca43a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 29 Jan 2004 20:15:12 +0000 Subject: disable template accounts by default (This used to be commit 02899224a195260140496c6e72aee66cc6d65ee4) --- source3/script/mksmbpasswd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mksmbpasswd.sh b/source3/script/mksmbpasswd.sh index 854e1bd1b5..119a55611e 100755 --- a/source3/script/mksmbpasswd.sh +++ b/source3/script/mksmbpasswd.sh @@ -2,5 +2,5 @@ awk 'BEGIN {FS=":" printf("#\n# SMB password file.\n#\n") } -{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[U ]:LCT-00000000:%s\n", $1, $3, $5) } +{ printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:[UD ]:LCT-00000000:%s\n", $1, $3, $5) } ' -- cgit From 727bc707b6ee4435c8f1a8988e5f80eb3a67fbc8 Mon Sep 17 00:00:00 2001 From: Herb Lewis Date: Thu, 12 Feb 2004 20:43:23 +0000 Subject: merge old change from 2.2 branch to give legend in heading (This used to be commit ed4af810cf74943e9c1881ddc4044646fd72c998) --- source3/script/findsmb.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/findsmb.in b/source3/script/findsmb.in index fb06018fe5..546cf8ce7b 100755 --- a/source3/script/findsmb.in +++ b/source3/script/findsmb.in @@ -57,8 +57,9 @@ open(NMBLOOKUP,"$SAMBABIN/nmblookup $BCAST '*' --debuglevel=0|") || @ipaddrs = sort ipsort grep(s/ \*<00>.*$//,); # print header info - -print "\nIP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n"; +print "\n *=DMB\n"; +print " +=LMB\n"; +print "IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION $BCAST\n"; print "---------------------------------------------------------------------\n"; foreach $ip (@ipaddrs) # loop through each IP address found -- cgit From 08d03a703957b90d194819799597ea87e2913a57 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 2 Mar 2004 18:10:12 +0000 Subject: BUG 1129: patch from shiro@miraclelinux.com (Shiro Yamada) to install image files for SWAT (This used to be commit a01a7fdbd93997185322d1faaa76c408f0ed2b1d) --- source3/script/installswat.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index c0285bda55..495386e0b7 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -81,6 +81,22 @@ if [ -d $SRCDIR../docs/htmldocs/ ]; then cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? chmod 0644 $FNAME done + + if [ -d $SRCDIR../docs/htmldocs/images/ ]; then + if [ ! -d $SWATDIR/help/images/ ]; then + mkdir $SWATDIR/help/images + if [ ! -d $SWATDIR/help/images/ ]; then + echo Failed to make directory $SWATDIR/help/images, does $USER have privileges? + exit 1 + fi + fi + for f in $SRCDIR../docs/htmldocs/images/*.png; do + FNAME=$SWATDIR/help/images/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done + fi fi # Install Using Samba book (but only if it is there) -- cgit From a79b205d9202a61ef5c82f7fccd1513df0290585 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 19 Mar 2004 01:29:14 +0000 Subject: Fix gcc warnings. Fix mkproto with new type. Jeremy. (This used to be commit 00fa66df3edeb92ec5efd49bd61f98691e74877a) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 3835ea3af3..b38f405e0d 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -132,7 +132,7 @@ END { gotstart = 1; } - if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2/ ) { + if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE/ ) { gotstart = 1; } -- cgit From 931df5850e326ad0639fe317e0ca82e6d820a68e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 5 Apr 2004 12:19:50 +0000 Subject: r39: * importing .cvsignore files * updateing WHATSNEW with vl's change (This used to be commit a7e2730ec4389e0c249886a8bfe1ee14c5abac41) --- source3/script/.cvsignore | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 source3/script/.cvsignore (limited to 'source3/script') diff --git a/source3/script/.cvsignore b/source3/script/.cvsignore deleted file mode 100644 index 0464ca2335..0000000000 --- a/source3/script/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -findsmb -gen-8bit-gap.sh -- cgit From f8c418a0afba2aae6449e91ec83312cb92a46c34 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 14 Apr 2004 08:47:53 +0000 Subject: r208: merge the version schema changes from 4_0 metze (This used to be commit 4d9d8e83aa367fe17a74b81d4417cc2cfbdf200e) --- source3/script/mkversion.sh | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh index ca39297940..f3d385e27e 100755 --- a/source3/script/mkversion.sh +++ b/source3/script/mkversion.sh @@ -24,13 +24,7 @@ SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` -SAMBA_VERSION_BETA_RELEASE=`sed -n 's/^SAMBA_VERSION_BETA_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` - -SAMBA_VERSION_ALPHA_RELEASE=`sed -n 's/^SAMBA_VERSION_ALPHA_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` - -SAMBA_VERSION_TEST_RELEASE=`sed -n 's/^SAMBA_VERSION_TEST_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` - -SAMBA_VERSION_IS_CVS_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_CVS_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE` +SAMBA_VERSION_IS_SVN_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_SVN_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_VENDOR_SUFFIX=`sed -n 's/^SAMBA_VERSION_VENDOR_SUFFIX=//p' $SOURCE_DIR$VERSION_FILE` @@ -53,21 +47,19 @@ elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then elif test -n "${SAMBA_VERSION_RC_RELEASE}";then SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}rc${SAMBA_VERSION_RC_RELEASE}" echo "#define SAMBA_VERSION_RC_RELEASE ${SAMBA_VERSION_RC_RELEASE}" >> $OUTPUT_FILE -elif test -n "${SAMBA_VERSION_BETA_RELEASE}";then - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}beta${SAMBA_VERSION_BETA_RELEASE}" - echo "#define SAMBA_VERSION_BETA_RELEASE ${SAMBA_VERSION_BETA_RELEASE}" >> $OUTPUT_FILE -elif test -n "${SAMBA_VERSION_ALPHA_RELEASE}";then - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}alpha${SAMBA_VERSION_ALPHA_RELEASE}" - echo "#define SAMBA_VERSION_ALPHA_RELEASE ${SAMBA_VERSION_ALPHA_RELEASE}" >> $OUTPUT_FILE -elif test -n "${SAMBA_VERSION_TEST_RELEASE}";then - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}test${SAMBA_VERSION_TEST_RELEASE}" - echo "#define SAMBA_VERSION_TEST_RELEASE ${SAMBA_VERSION_TEST_RELEASE}" >> $OUTPUT_FILE fi -if test x"${SAMBA_VERSION_IS_CVS_SNAPSHOT}" = x"yes";then - SAMBA_VERSION_STRING="CVS ${SAMBA_VERSION_STRING}" - echo "#define SAMBA_VERSION_IS_CVS_SNAPSHOT 1" >> $OUTPUT_FILE +if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then + TMP_SVN_REVISION=`(svn info ${SOURCE_DIR} 2>/dev/null || svk info ${SOURCE_DIR} 2>/dev/null) |grep Revision: |sed -e 's/Revision: \([0-9]*\).*/\1/'` + TMP_SVN_REVISION_STR="" + if test -n "${TMP_SVN_REVISION}";then + TMP_SVN_REVISION_STR="-${TMP_SVN_REVISION}" + else + TMP_SVN_REVISION=0 + fi + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVN-build${TMP_SVN_REVISION_STR}" + echo "#define SAMBA_VERSION_SVN_REVISION ${TMP_SVN_REVISION}" >> $OUTPUT_FILE fi if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then -- cgit From 1cd9d74016b2fdc84cae14d21a25016443da99ed Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 14 Apr 2004 15:17:34 +0000 Subject: r215: merge over svk fixes from 4_0 metze (This used to be commit 2326c9e0a239de6997a40d8d28c39b9aea965feb) --- source3/script/mkversion.sh | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh index f3d385e27e..f66e1cc1ac 100755 --- a/source3/script/mkversion.sh +++ b/source3/script/mkversion.sh @@ -51,15 +51,23 @@ fi if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then - TMP_SVN_REVISION=`(svn info ${SOURCE_DIR} 2>/dev/null || svk info ${SOURCE_DIR} 2>/dev/null) |grep Revision: |sed -e 's/Revision: \([0-9]*\).*/\1/'` - TMP_SVN_REVISION_STR="" - if test -n "${TMP_SVN_REVISION}";then - TMP_SVN_REVISION_STR="-${TMP_SVN_REVISION}" + HAVESVN=no + svn info ${SOURCE_DIR} >/dev/null 2>&1 && HAVESVN=yes + TMP_REVISION=`(svn info ${SOURCE_DIR} 2>/dev/null || svk info ${SOURCE_DIR} 2>/dev/null) |grep Revision: |sed -e 's/Revision: \([0-9]*\).*/\1/'` + if test x"${HAVESVN}" = x"no";then + HAVESVK=no + svk info ${SOURCE_DIR} >/dev/null 2>&1 && HAVESVK=yes + TMP_SVK_REVISION_STR="${TMP_REVISION}-${USER}@${HOSTNAME}" + fi + + if test x"${HAVESVN}" = x"yes";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVN-build-${TMP_REVISION}" + echo "#define SAMBA_VERSION_SVN_REVISION ${TMP_REVISION}" >> $OUTPUT_FILE + elif test x"${HAVESVK}" = x"yes";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVK-build-${TMP_SVK_REVISION_STR}" else - TMP_SVN_REVISION=0 + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVN-build-UNKNOWN" fi - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVN-build${TMP_SVN_REVISION_STR}" - echo "#define SAMBA_VERSION_SVN_REVISION ${TMP_SVN_REVISION}" >> $OUTPUT_FILE fi if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then -- cgit From 65d9febf9a60be05f64598909679998b5734ac16 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 29 Apr 2004 21:03:42 +0000 Subject: r413: merge from 4_0: as we decide to not do 3.0.2a releases anymore, remove the generation stuff from VERSION and mkversion.sh metze (This used to be commit 25cbca89baa89327384e80ad5f71577c3db6d6a2) --- source3/script/mkversion.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh index f66e1cc1ac..917a9ed1ae 100755 --- a/source3/script/mkversion.sh +++ b/source3/script/mkversion.sh @@ -18,8 +18,6 @@ SAMBA_VERSION_MAJOR=`sed -n 's/^SAMBA_VERSION_MAJOR=//p' $SOURCE_DIR$VERSION_FIL SAMBA_VERSION_MINOR=`sed -n 's/^SAMBA_VERSION_MINOR=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` -SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE` - SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` @@ -38,10 +36,7 @@ echo "#define SAMBA_VERSION_RELEASE ${SAMBA_VERSION_RELEASE}" >> $OUTPUT_FILE SAMBA_VERSION_STRING="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}" -if test -n "${SAMBA_VERSION_REVISION}";then - SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}${SAMBA_VERSION_REVISION}" - echo "#define SAMBA_VERSION_REVISION \"${SAMBA_VERSION_REVISION}\"" >> $OUTPUT_FILE -elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then +if test -n "${SAMBA_VERSION_PRE_RELEASE}";then SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}" echo "#define SAMBA_VERSION_PRE_RELEASE ${SAMBA_VERSION_PRE_RELEASE}" >> $OUTPUT_FILE elif test -n "${SAMBA_VERSION_RC_RELEASE}";then -- cgit From 4f9c8e28ac43bf3c64f3edbadf7051fc9091624a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 5 May 2004 15:52:11 +0000 Subject: r496: fixing swat welcome page -- added links to example guide, devel guide, and howto (all in multi page format) (This used to be commit 984d9fe271a86da696cedb81aa9de46c5716bba3) --- source3/script/installswat.sh | 55 ++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 21 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 495386e0b7..67586a8967 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -75,28 +75,41 @@ done if [ -d $SRCDIR../docs/htmldocs/ ]; then - for f in $SRCDIR../docs/htmldocs/*.html; do - FNAME=$SWATDIR/help/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME - done + for dir in htmldocs/ htmldocs/howto htmldocs/guide htmldocs/devel + do + + if [ ! -d $SRCDIR../docs/$dir ]; then + continue + fi + + INSTALLDIR=$SWATDIR/help/`echo $dir | sed 's/htmldocs\///g'` + if [ ! -d $INSTALLDIR ]; then + mkdir $INSTALLDIR + fi - if [ -d $SRCDIR../docs/htmldocs/images/ ]; then - if [ ! -d $SWATDIR/help/images/ ]; then - mkdir $SWATDIR/help/images - if [ ! -d $SWATDIR/help/images/ ]; then - echo Failed to make directory $SWATDIR/help/images, does $USER have privileges? - exit 1 - fi - fi - for f in $SRCDIR../docs/htmldocs/images/*.png; do - FNAME=$SWATDIR/help/images/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME - done - fi + for f in $SRCDIR../docs/$dir/*.html; do + FNAME=$INSTALLDIR/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done + + if [ -d $SRCDIR../docs/$dir/images/ ]; then + if [ ! -d $INSTALLDIR/images/ ]; then + mkdir $INSTALLDIR/images + if [ ! -d $INSTALLDIR/images/ ]; then + echo Failed to make directory $SWATDIR/help/images, does $USER have privileges? + exit 1 + fi + fi + for f in $SRCDIR../docs/$dir/images/*.png; do + FNAME=$INSTALLDIR/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done + fi + done fi # Install Using Samba book (but only if it is there) -- cgit From b4594cec6e527b9e91a979fa6b3152a6e530efaa Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 22 May 2004 14:52:34 +0000 Subject: r824: merge from: SAMBA_4_0: use 'Last Change Rev:' instead of 'Revision:' from the svn info output for setting the SVN_REVISION in version.h metze (This used to be commit 7cc35ba06644669e64460b03c141a23ad7a516d7) --- source3/script/mkversion.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh index 917a9ed1ae..492ecaade2 100755 --- a/source3/script/mkversion.sh +++ b/source3/script/mkversion.sh @@ -48,7 +48,7 @@ fi if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then HAVESVN=no svn info ${SOURCE_DIR} >/dev/null 2>&1 && HAVESVN=yes - TMP_REVISION=`(svn info ${SOURCE_DIR} 2>/dev/null || svk info ${SOURCE_DIR} 2>/dev/null) |grep Revision: |sed -e 's/Revision: \([0-9]*\).*/\1/'` + TMP_REVISION=`(svn info ${SOURCE_DIR} 2>/dev/null || svk info ${SOURCE_DIR} 2>/dev/null) |grep 'Last Changed Rev.*:' |sed -e 's/Last Changed Rev.*: \([0-9]*\).*/\1/'` if test x"${HAVESVN}" = x"no";then HAVESVK=no svk info ${SOURCE_DIR} >/dev/null 2>&1 && HAVESVK=yes -- cgit From 2fc57c9a2ce3a266534dd20e6fed4883e052c557 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 8 Jun 2004 16:14:31 +0000 Subject: r1085: Now it's had some proper user testing, merge in the deferred open fix. I'm still doing more testing, but it fixes a behaviour that we've been wrong on ever since the start of Samba. Jeremy. (This used to be commit 894cc6d16296b934c112786eec896846156aee5d) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index b38f405e0d..fbe1bddf35 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -124,7 +124,7 @@ END { gotstart = 1; } - if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^CLI_POLICY_HND|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT/ ) { + if( $0 ~ /^smb_iconv_t|^long|^char|^uint|^NTSTATUS|^WERROR|^CLI_POLICY_HND|^struct|^BOOL|^void|^time|^smb_shm_offset_t|^shm_offset_t|^FILE|^XFILE|^SMB_OFF_T|^size_t|^ssize_t|^SMB_BIG_UINT|^SMB_BIG_INT/ ) { gotstart = 1; } -- cgit From 2b76b28932d9d1ed714e79579414f630966342e7 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 24 Jun 2004 05:56:44 +0000 Subject: r1236: Heimdal fixes from Guenther Deschner , more to come before it compiles with Heimdal. Jeremy. (This used to be commit dd07278b892770ac51750b87a4ab902d4de3a960) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index fbe1bddf35..03151d656a 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -132,7 +132,7 @@ END { gotstart = 1; } - if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE/ ) { + if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code/ ) { gotstart = 1; } -- cgit From 569177a194ef990b55d3ad5d5243ca0f2659f25c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 1 Jul 2004 16:35:43 +0000 Subject: r1317: Patch from Joe Meadows "Joe Meadows" to add a timeout to the ldap open calls. New parameter, ldap timeout added. Jeremy. (This used to be commit e5b3094c4cc75eb07f667dd1aeb73921ed7366ac) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 03151d656a..4c9507dcf9 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -132,7 +132,7 @@ END { gotstart = 1; } - if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code/ ) { + if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP/ ) { gotstart = 1; } -- cgit From 824bc32be71afafdbaaea94a6cf104a1b3d329ec Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 8 Jul 2004 15:36:23 +0000 Subject: r1399: applying heimdal krb5 fixes from Guenther and fixing compile warnings in libadskerberos_keyatb.c (This used to be commit 837f56ec8bc171497fb84d332002776313c26305) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 4c9507dcf9..ab9f7d7cb7 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -132,7 +132,7 @@ END { gotstart = 1; } - if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP/ ) { + if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP|^krb5_error_code/ ) { gotstart = 1; } -- cgit From 0122d4ef5e441e5470e190b77567d00b703e549e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 8 Jul 2004 18:14:07 +0000 Subject: r1407: revert change that broke the build on systems w/o krb5 files (This used to be commit 89a11b5d7c0939c9344115ef509cbb0567d7524a) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index ab9f7d7cb7..4c9507dcf9 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -132,7 +132,7 @@ END { gotstart = 1; } - if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP|^krb5_error_code/ ) { + if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP/ ) { gotstart = 1; } -- cgit From c1a0b0a9e7ce57bdb0e5341f8d272bc02a4b6e84 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 8 Jul 2004 19:44:41 +0000 Subject: r1410: fix another bug caused by the docs target directories change (This used to be commit e13d15994d93b0b17ea4f547cc6e279c3509a7d0) --- source3/script/installswat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 67586a8967..9e3ab689b4 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -75,7 +75,7 @@ done if [ -d $SRCDIR../docs/htmldocs/ ]; then - for dir in htmldocs/ htmldocs/howto htmldocs/guide htmldocs/devel + for dir in htmldocs/ htmldocs/Samba-HOWTO-Collection htmldocs/Samba-Guide htmldocs/Samba-Developers-Guide do if [ ! -d $SRCDIR../docs/$dir ]; then -- cgit From f1688d61df13aacb0e512fd16504cc94f803d808 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 30 Aug 2004 20:19:40 +0000 Subject: r2112: Simplify the mangle hash code to use an in-memory tdb. Should be ready for the new directory code now... Jeremy. (This used to be commit c2eff8ef1b65570d2e590f62f026cc18f9142652) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 4c9507dcf9..4edc7abc63 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -132,7 +132,7 @@ END { gotstart = 1; } - if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP/ ) { + if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP|^u32/ ) { gotstart = 1; } -- cgit From 07d8bf0f8fc29c2666edeeec03a7028f219f3e6d Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 23 Nov 2004 15:27:53 +0000 Subject: r3924: fix installswat once again after the image target location had changed in the docs (This used to be commit ddb5823ac23b8d61c29d73f4f5bae1c3a319a1f4) --- source3/script/installswat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 9e3ab689b4..6b66f6f23e 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -103,7 +103,7 @@ if [ -d $SRCDIR../docs/htmldocs/ ]; then fi fi for f in $SRCDIR../docs/$dir/images/*.png; do - FNAME=$INSTALLDIR/`basename $f` + FNAME=$INSTALLDIR/images/`basename $f` echo $FNAME cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? chmod 0644 $FNAME -- cgit From 46e5effea948931509283cb84b27007d34b521c8 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 17 Jan 2005 15:23:11 +0000 Subject: r4805: Last planned change to the privileges infrastructure: * rewrote the tdb layout of privilege records in account_pol.tdb (allow for 128 bits instead of 32 bit flags) * migrated to using SE_PRIV structure instead of the PRIVILEGE_SET structure. The latter is now used for parsing routines mainly. Still need to incorporate some client support into 'net' so for setting privileges. And make use of the SeAddUserPrivilege right. (This used to be commit 41dc7f7573c6d637e19a01e7ed0e716ac0f1fb15) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 4edc7abc63..45cc0821aa 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -132,7 +132,7 @@ END { gotstart = 1; } - if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP|^u32/ ) { + if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP|^u32|^LUID_ATTR/ ) { gotstart = 1; } -- cgit From b62fae5edc6115b265660447d8833166fdd771fa Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 20 Mar 2005 21:08:50 +0000 Subject: r5915: Remove --with-manpages-languages= from configure (we only have them in one lanuage, English, at the moment). Fixes #2261. If other languages might are added in the future, this parameter will still not be needed. (This used to be commit d41e790b4ba96b42ae80f51925a86a3344d3fd39) --- source3/script/installman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index c7a8f45095..d30429d50a 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -15,7 +15,7 @@ fi for lang in $langs; do - if [ "X$lang" = Xen ]; then + if [ "X$lang" = XC ]; then echo Installing default man pages in $MANDIR/ lang=. else -- cgit From 6cc85bbe728421df9c3f21e1676789eca6814420 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 15 Apr 2005 15:39:00 +0000 Subject: r6354: merge from 4_0 rev 6353: we need the english output from the svn commands metze (This used to be commit 6b84f30e3d746a13613d94071501430fef8ee2ca) --- source3/script/mkversion.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh index 492ecaade2..6f49108aba 100755 --- a/source3/script/mkversion.sh +++ b/source3/script/mkversion.sh @@ -46,6 +46,8 @@ fi if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then + _SAVE_LANG=${LANG} + LANG="" HAVESVN=no svn info ${SOURCE_DIR} >/dev/null 2>&1 && HAVESVN=yes TMP_REVISION=`(svn info ${SOURCE_DIR} 2>/dev/null || svk info ${SOURCE_DIR} 2>/dev/null) |grep 'Last Changed Rev.*:' |sed -e 's/Last Changed Rev.*: \([0-9]*\).*/\1/'` @@ -63,6 +65,7 @@ if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then else SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}-SVN-build-UNKNOWN" fi + LANG=${_SAVE_LANG} fi if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then -- cgit From 0895eae50976de8b0e124ef85e39ed864d29c3d1 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 20 May 2005 14:12:28 +0000 Subject: r6925: merge rev 6920 from 4_0: display the SVN revision in svk build of tree's directly mirrored from samba.org metze (This used to be commit 110c0f6f36b8a5e7b0e1bf4477605ed81aca5580) --- source3/script/mkversion.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh index 6f49108aba..d9d84a5337 100755 --- a/source3/script/mkversion.sh +++ b/source3/script/mkversion.sh @@ -54,7 +54,12 @@ if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then if test x"${HAVESVN}" = x"no";then HAVESVK=no svk info ${SOURCE_DIR} >/dev/null 2>&1 && HAVESVK=yes - TMP_SVK_REVISION_STR="${TMP_REVISION}-${USER}@${HOSTNAME}" + TMP_MIRRORED_REVISION=`(svk info ${SOURCE_DIR} 2>/dev/null) |grep 'Mirrored From:.*samba\.org.*' |sed -e 's/Mirrored From: .* Rev\..* \([0-9]*\).*/\1/'` + if test -n "$TMP_MIRRORED_REVISION"; then + TMP_SVK_REVISION_STR="${TMP_REVISION}-${USER}@${HOSTNAME}-[SVN-${TMP_MIRRORED_REVISION}]" + else + TMP_SVK_REVISION_STR="${TMP_REVISION}-${USER}@${HOSTNAME}" + fi fi if test x"${HAVESVN}" = x"yes";then -- cgit From 5084d49052f47626b61e53add818fefaacc101b0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 3 Jun 2005 15:42:03 +0000 Subject: r7243: Don't look at gencache.tdb for the trusted domains if winbind is around. Volker (This used to be commit 94acb93f57b963bf137c6ddd644a147f4d0b5175) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 45cc0821aa..d9223a1973 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -132,7 +132,7 @@ END { gotstart = 1; } - if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP|^u32|^LUID_ATTR/ ) { + if( $0 ~ /^WINBINDD_PW|^WINBINDD_GR|^NT_PRINTER_INFO_LEVEL_2|^LOGIN_CACHE|^krb5_error_code|^LDAP|^u32|^LUID_ATTR|^NSS_STATUS/ ) { gotstart = 1; } -- cgit From 0b8bc68b50e1cf75686563375bd63c38aba197cb Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Mon, 20 Jun 2005 21:20:47 +0000 Subject: r7788: Update install swat message to reflect the fact that swat/README no longer exists. Bugzilla #2808. (This used to be commit 88a3faf84eb74a2a8c5a100170f82102c74e9939) --- source3/script/installswat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 6b66f6f23e..53c268a95a 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -157,7 +157,7 @@ fi cat << EOF ====================================================================== -The SWAT files have been installed. Remember to read the swat/README +The SWAT files have been installed. Remember to read the documentation for information on enabling and using SWAT ====================================================================== EOF -- cgit From 19ca97a70f6b7b41d251eaa76e4d3c980c6eedff Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 24 Jun 2005 20:25:18 +0000 Subject: r7882: Looks like a large patch - but what it actually does is make Samba safe for using our headers and linking with C++ modules. Stops us from using C++ reserved keywords in our code. Jeremy (This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a) --- source3/script/mkproto.awk | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index d9223a1973..3c48267587 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -136,6 +136,10 @@ END { gotstart = 1; } + if( $0 ~ /^NODE_STATUS_STRUCT/ ) { + gotstart = 1; + } + if(!gotstart) { next; } -- cgit From c25a9f4122e0f9d3d54aa92932bdaf6e6f1b5c74 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 27 Jun 2005 13:20:12 +0000 Subject: r7944: BUG 2808: don't try to install manpages if they are not present (This used to be commit 1ce5cc2a5f3da7ef6874cae5b433c139d68589c6) --- source3/script/installman.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index d30429d50a..5564ac0231 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -13,6 +13,10 @@ if [ $# -ge 4 ] ; then GROFF=$4 # sh cmd line, including options fi +if test ! -d docs/manpages; then + echo "No manpages present. SVN development version maybe?" + exit 0 +fi for lang in $langs; do if [ "X$lang" = XC ]; then -- cgit From 1d4eb573239224b2886d1e066d544af31c29ce1f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 12 Jul 2005 17:23:19 +0000 Subject: r8388: fix typo in installman script (This used to be commit 30b03519c0320bdc85ece51aaf814c4b66896df8) --- source3/script/installman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 5564ac0231..9cd9100839 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -13,7 +13,7 @@ if [ $# -ge 4 ] ; then GROFF=$4 # sh cmd line, including options fi -if test ! -d docs/manpages; then +if test ! -d ../docs/manpages; then echo "No manpages present. SVN development version maybe?" exit 0 fi -- cgit From 9451a51b59a71b87c3a2afb9cbc3812a7a578a9a Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 28 Jul 2005 17:28:20 +0000 Subject: r8834: fixing SWAT install after docs changeswat/help/welcome.html (This used to be commit 6fb371f0c87379a9812ff0cad30c739df171a462) --- source3/script/installswat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 53c268a95a..2b99b9c57f 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -3,7 +3,7 @@ SWATDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2/ -BOOKDIR=$SWATDIR/using_samba +BOOKDIR=$SWATDIR/help/using_samba echo Installing SWAT in $SWATDIR echo Installing the Samba Web Administration Tool @@ -75,7 +75,7 @@ done if [ -d $SRCDIR../docs/htmldocs/ ]; then - for dir in htmldocs/ htmldocs/Samba-HOWTO-Collection htmldocs/Samba-Guide htmldocs/Samba-Developers-Guide + for dir in htmldocs/manpages htmldocs/Samba3-ByExample htmldocs/Samba3-Developers-Guide htmldocs/Samba3-HOWTO do if [ ! -d $SRCDIR../docs/$dir ]; then -- cgit From c731d11471ea9edd762b4cdb67bac06e77cb6f45 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 3 Aug 2005 05:46:43 +0000 Subject: r8990: First trivial example of 'make test' (This used to be commit 11c886394970713a226d1fe46a4931ef97bb39a8) --- source3/script/tests/gdb_backtrace | 41 ++++++++++++++++++++++++++++++++++++++ source3/script/tests/runtests.sh | 41 ++++++++++++++++++++++++++++++++++++++ source3/script/tests/t_listing.sh | 28 ++++++++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 source3/script/tests/gdb_backtrace create mode 100644 source3/script/tests/runtests.sh create mode 100644 source3/script/tests/t_listing.sh (limited to 'source3/script') diff --git a/source3/script/tests/gdb_backtrace b/source3/script/tests/gdb_backtrace new file mode 100644 index 0000000000..2ea6a4d00a --- /dev/null +++ b/source3/script/tests/gdb_backtrace @@ -0,0 +1,41 @@ +#! /bin/sh +# +# Author: Andrew Tridgell + +# we want everything on stderr, so the program is not disturbed +exec 1>&2 + +BASENAME=$( basename $0) + +test -z ${GDB_BIN} && GDB_BIN=$( type -p gdb) +if [ -z ${GDB_BIN} ]; then + echo "ERROR: ${BASENAME} needs an installed gdb. " + exit 1 +fi + +if [ -z $1 ]; then + echo "ERROR: ${BASENAME} needs a PID. " + exit 1 +fi +PID=$1 + +# use /dev/shm as default temp directory +test -d /dev/shm && \ + TMP_BASE_DIR=/dev/shm || \ + TMP_BASE_DIR=/var/tmp +TMPFILE=$( mktemp -p ${TMP_BASE_DIR} backtrace.XXXXXX) +if [ $? -ne 0 ]; then + echo "ERROR: ${basename} can't create temp file in ${TMP_BASE_DIR}. " + exit 1 +fi + +cat << EOF > "${TMPFILE}" +set height 0 +up 8 +bt full +quit +EOF + +${GDB_BIN} -x "${TMPFILE}" "/proc/${PID}/exe" "${PID}" + +/bin/rm -f "${TMPFILE}" diff --git a/source3/script/tests/runtests.sh b/source3/script/tests/runtests.sh new file mode 100644 index 0000000000..2483de97ca --- /dev/null +++ b/source3/script/tests/runtests.sh @@ -0,0 +1,41 @@ +#!/bin/sh + +DOMAIN=SAMBA-TEST +export DOMAIN + +if [ "x$1" == "x" ]; then + echo "$0 " + exit 1 +fi + +PREFIX=`echo $1 | sed s+//+/+` + +mkdir -p $PREFIX || exit $? +OLD_PWD=`pwd` +cd $PREFIX || exit $? +export PREFIX_ABS=`pwd` +cd $OLD_PWD + +TMPDIR=$PREFIX_ABS/tmp +LIBDIR=$PREFIX_ABS/lib +PIDDIR=$PREFIX_ABS/pid +CONFFILE=$LIBDIR/smb.conf +PRIVATEDIR=$PREFIX_ABS/private +LOCKDIR=$PREFIX_ABS/lockdir +LOGDIR=$PREFIX_ABS/logs +SOCKET_WRAPPER_DIR=$PREFIX_ABS/sockwrap +CONFIGURATION="-s $CONFFILE" + +PATH=`pwd`/bin:$PATH + +rm -rf $PREFIX/* +mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $TMPDIR $LOGDIR $SOCKET_WRAPPER_DIR + +export PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR +export PRIVATEDIR LIBDIR PIDDIR LOCKDIR TMPDIR LOGDIR + +cd script/tests +for testfile in t_*sh; do + sh $testfile +done + diff --git a/source3/script/tests/t_listing.sh b/source3/script/tests/t_listing.sh new file mode 100644 index 0000000000..0689807671 --- /dev/null +++ b/source3/script/tests/t_listing.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +cat >$CONFFILE< Date: Wed, 3 Aug 2005 06:24:28 +0000 Subject: r8992: More make test work. Adding a way to order tests (might change my mind on this later). (This used to be commit 136fe3f15e74686882f7c1e5a46fcc0bcf7d51a6) --- source3/script/tests/functions | 4 ++++ source3/script/tests/runtests.sh | 27 ++++++++++++++++++++------- source3/script/tests/t_001.sh | 30 ++++++++++++++++++++++++++++++ source3/script/tests/t_listing.sh | 28 ---------------------------- 4 files changed, 54 insertions(+), 35 deletions(-) create mode 100644 source3/script/tests/functions create mode 100644 source3/script/tests/t_001.sh delete mode 100644 source3/script/tests/t_listing.sh (limited to 'source3/script') diff --git a/source3/script/tests/functions b/source3/script/tests/functions new file mode 100644 index 0000000000..0969c98724 --- /dev/null +++ b/source3/script/tests/functions @@ -0,0 +1,4 @@ +## +## library file for test functions +## + diff --git a/source3/script/tests/runtests.sh b/source3/script/tests/runtests.sh index 2483de97ca..6ee6d3a32b 100644 --- a/source3/script/tests/runtests.sh +++ b/source3/script/tests/runtests.sh @@ -1,21 +1,28 @@ #!/bin/sh -DOMAIN=SAMBA-TEST -export DOMAIN - if [ "x$1" == "x" ]; then echo "$0 " exit 1 fi +## +## create the test directory +## PREFIX=`echo $1 | sed s+//+/+` - mkdir -p $PREFIX || exit $? OLD_PWD=`pwd` cd $PREFIX || exit $? export PREFIX_ABS=`pwd` cd $OLD_PWD +## +## setup the various environment variables we need +## + +DOMAIN=SAMBA-TEST + +SRCDIR=`pwd` +SCRIPTDIR=$SRCDIR/script/tests TMPDIR=$PREFIX_ABS/tmp LIBDIR=$PREFIX_ABS/lib PIDDIR=$PREFIX_ABS/pid @@ -31,11 +38,17 @@ PATH=`pwd`/bin:$PATH rm -rf $PREFIX/* mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $TMPDIR $LOGDIR $SOCKET_WRAPPER_DIR -export PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR +export PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR DOMAIN export PRIVATEDIR LIBDIR PIDDIR LOCKDIR TMPDIR LOGDIR +export SRCDIR SCRIPTDIR -cd script/tests -for testfile in t_*sh; do +for testfile in `ls $SCRIPTDIR/t_*sh | sort`; do + echo ">>>>>> Starting test driver `basename $testfile` <<<<<" sh $testfile + if [ $? = 0 ]; then + echo ">>>>> test ok <<<<<" + else + echo ">>>>> test failed <<<<<" + fi done diff --git a/source3/script/tests/t_001.sh b/source3/script/tests/t_001.sh new file mode 100644 index 0000000000..86837050c7 --- /dev/null +++ b/source3/script/tests/t_001.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +. $SCRIPTDIR/functions + +cat >$CONFFILE<$CONFFILE< Date: Thu, 4 Aug 2005 02:59:19 +0000 Subject: r9038: Revert svn rev 414. Discussed with Jerry and Metze. We need the option to add an 'a' if we're already in pre or rc state with the next release. Bugzilla Bug 2618 (This used to be commit 26bf1d223efd011ca7c4d5c7d5de23d0f9ad0823) --- source3/script/mkversion.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh index d9d84a5337..9d919cfe34 100755 --- a/source3/script/mkversion.sh +++ b/source3/script/mkversion.sh @@ -18,6 +18,8 @@ SAMBA_VERSION_MAJOR=`sed -n 's/^SAMBA_VERSION_MAJOR=//p' $SOURCE_DIR$VERSION_FIL SAMBA_VERSION_MINOR=`sed -n 's/^SAMBA_VERSION_MINOR=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` +SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE` + SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` @@ -36,7 +38,10 @@ echo "#define SAMBA_VERSION_RELEASE ${SAMBA_VERSION_RELEASE}" >> $OUTPUT_FILE SAMBA_VERSION_STRING="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}" -if test -n "${SAMBA_VERSION_PRE_RELEASE}";then +if test -n "${SAMBA_VERSION_REVISION}";then + SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}${SAMBA_VERSION_REVISION}" + echo "#define SAMBA_VERSION_REVISION \"${SAMBA_VERSION_REVISION}\"" >> $OUTPUT_FILE +elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}" echo "#define SAMBA_VERSION_PRE_RELEASE ${SAMBA_VERSION_PRE_RELEASE}" >> $OUTPUT_FILE elif test -n "${SAMBA_VERSION_RC_RELEASE}";then -- cgit From f98f86394a654722fa13ef1dc3c4dea82d452442 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 22 Aug 2005 18:03:08 +0000 Subject: r9483: Changed DIR to SMB_STRUCT_DIR because of the amazing stupidity of a UNIX vendor not understanding abstract data types :-(. Jeremy. (This used to be commit be5b4e2fa3ed30b0ff01b47d2354e5f782a12e25) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 3c48267587..3940c34700 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -136,7 +136,7 @@ END { gotstart = 1; } - if( $0 ~ /^NODE_STATUS_STRUCT/ ) { + if( $0 ~ /^NODE_STATUS_STRUCT|SMB_STRUCT_DIR/ ) { gotstart = 1; } -- cgit From 35f12fd94db0b89d6670945f6f27c3b8d316118b Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 23 Aug 2005 22:10:44 +0000 Subject: r9548: more additions to make test; better checks for starting and stopping smbd (This used to be commit dbaaf81cec59aae01e71bbb639e1937ebee2454d) --- source3/script/tests/functions | 38 ++++++++++++++++++++++++++++++++++++++ source3/script/tests/runtests.sh | 37 +++++++++++++++++++++++++++++++------ source3/script/tests/t_001.sh | 22 +++++++--------------- 3 files changed, 76 insertions(+), 21 deletions(-) (limited to 'source3/script') diff --git a/source3/script/tests/functions b/source3/script/tests/functions index 0969c98724..4cc8d4a2c0 100644 --- a/source3/script/tests/functions +++ b/source3/script/tests/functions @@ -2,3 +2,41 @@ ## library file for test functions ## +## +## start/stop smbd daemon +## +check_smbd_running() +{ + ## the smbcontrol ping will return a 0 on success + smbcontrol $CONFIGURATION smbd ping 2>&1 > /dev/null +} + +start_smbd() +{ + echo "Starting smbd...." + + smbd $CONFIGURATION || return $? + + sleep 1 + + smbcontrol $CONFIGURATION `cat $PIDDIR/smbd.pid` ping 2>&1 > /dev/null || return $? +} + +stop_smbd() +{ + smbd_pid=`cat $PIDDIR/smbd.pid` + echo "Shutting down smbd (pid $smbd_pid)..." + + ## belt and braces; first kill and then send a shutdown message + + kill -TERM $smbd_pid + smbcontrol $CONFIGURATION smbd shutdown + + ## check to see if smbd is already running + check_smbd_running + if test $? == 0; then + echo "Unable to stop smbd!" + exit 2 + fi +} + diff --git a/source3/script/tests/runtests.sh b/source3/script/tests/runtests.sh index 6ee6d3a32b..e8594f5199 100644 --- a/source3/script/tests/runtests.sh +++ b/source3/script/tests/runtests.sh @@ -19,8 +19,6 @@ cd $OLD_PWD ## setup the various environment variables we need ## -DOMAIN=SAMBA-TEST - SRCDIR=`pwd` SCRIPTDIR=$SRCDIR/script/tests TMPDIR=$PREFIX_ABS/tmp @@ -32,16 +30,43 @@ LOCKDIR=$PREFIX_ABS/lockdir LOGDIR=$PREFIX_ABS/logs SOCKET_WRAPPER_DIR=$PREFIX_ABS/sockwrap CONFIGURATION="-s $CONFFILE" - PATH=`pwd`/bin:$PATH -rm -rf $PREFIX/* -mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $TMPDIR $LOGDIR $SOCKET_WRAPPER_DIR - export PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR DOMAIN export PRIVATEDIR LIBDIR PIDDIR LOCKDIR TMPDIR LOGDIR export SRCDIR SCRIPTDIR +## +## create the test directory layout +## + +/bin/rm -rf $PREFIX/* +mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $TMPDIR $LOGDIR $SOCKET_WRAPPER_DIR + +## +## Create the common config include file with the basic settings +## + +cat >$LIBDIR/common.conf<>>>>> Starting test driver `basename $testfile` <<<<<" sh $testfile diff --git a/source3/script/tests/t_001.sh b/source3/script/tests/t_001.sh index 86837050c7..f9f530c974 100644 --- a/source3/script/tests/t_001.sh +++ b/source3/script/tests/t_001.sh @@ -4,27 +4,19 @@ cat >$CONFFILE< Date: Wed, 24 Aug 2005 03:09:49 +0000 Subject: r9562: successfully get the samba 3 smbtorture working (as a test case for infrastructre) (This used to be commit c64f5666b8d1f9fb617b1cf89d6157a0c3fa9da9) --- source3/script/tests/functions | 40 ++++++++++++++++++++++++++++++++++++++++ source3/script/tests/runtests.sh | 40 +++++++++++++++++++++++++++++++++++++++- source3/script/tests/t_001.sh | 3 +++ source3/script/tests/t_002.sh | 25 +++++++++++++++++++++++++ 4 files changed, 107 insertions(+), 1 deletion(-) create mode 100644 source3/script/tests/t_002.sh (limited to 'source3/script') diff --git a/source3/script/tests/functions b/source3/script/tests/functions index 4cc8d4a2c0..40e185e153 100644 --- a/source3/script/tests/functions +++ b/source3/script/tests/functions @@ -40,3 +40,43 @@ stop_smbd() fi } + +## +## start/stop smbd daemon +## +check_nmbd_running() +{ + ## the smbcontrol ping will return a 0 on success + smbcontrol $CONFIGURATION nmbd ping 2>&1 > /dev/null +} + +start_nmbd() +{ + echo "Starting nmbd...." + + nmbd $CONFIGURATION || return $? + + sleep 1 + + # smbcontrol $CONFIGURATION `cat $PIDDIR/nmbd.pid` ping 2>&1 > /dev/null || return $? + kill -0 `cat $PIDDIR/nmbd.pid` +} + +stop_nmbd() +{ + nmbd_pid=`cat $PIDDIR/nmbd.pid` + echo "Shutting down nmbd (pid $nmbd_pid)..." + + ## belt and braces; first kill and then send a shutdown message + + kill -TERM $nmbd_pid 2> /dev/null + sleep 1 + + ## check to see if smbd is already running + kill -0 $nmbd_pid 2> /dev/null + if test $? == 0; then + echo "Unable to stop nmbd!" + exit 2 + fi +} + diff --git a/source3/script/tests/runtests.sh b/source3/script/tests/runtests.sh index e8594f5199..b814ad91e7 100644 --- a/source3/script/tests/runtests.sh +++ b/source3/script/tests/runtests.sh @@ -5,6 +5,10 @@ if [ "x$1" == "x" ]; then exit 1 fi +if [ $# == 2 ]; then + testnum=$2 +fi + ## ## create the test directory ## @@ -19,6 +23,9 @@ cd $OLD_PWD ## setup the various environment variables we need ## +USERNAME=`whoami` +PASSWORD=test + SRCDIR=`pwd` SCRIPTDIR=$SRCDIR/script/tests TMPDIR=$PREFIX_ABS/tmp @@ -35,6 +42,7 @@ PATH=`pwd`/bin:$PATH export PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR DOMAIN export PRIVATEDIR LIBDIR PIDDIR LOCKDIR TMPDIR LOGDIR export SRCDIR SCRIPTDIR +export USERNAME PASSWORD ## ## create the test directory layout @@ -42,6 +50,7 @@ export SRCDIR SCRIPTDIR /bin/rm -rf $PREFIX/* mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $TMPDIR $LOGDIR $SOCKET_WRAPPER_DIR +chmod 1777 $TMPDIR ## ## Create the common config include file with the basic settings @@ -57,17 +66,46 @@ cat >$LIBDIR/common.conf<$LIBDIR/smb.conf<>>>>> Starting test driver `basename $testfile` <<<<<" + sh $testfile + if [ $? = 0 ]; then + echo ">>>>> test ok <<<<<" + else + echo ">>>>> test failed <<<<<" + fi + + exit 0 +fi + for testfile in `ls $SCRIPTDIR/t_*sh | sort`; do + echo " " echo ">>>>>> Starting test driver `basename $testfile` <<<<<" sh $testfile if [ $? = 0 ]; then diff --git a/source3/script/tests/t_001.sh b/source3/script/tests/t_001.sh index f9f530c974..77b023c4c4 100644 --- a/source3/script/tests/t_001.sh +++ b/source3/script/tests/t_001.sh @@ -18,5 +18,8 @@ EOF start_smbd || exit $? smbclient $CONFIGURATION -L localhost -N -p 139 +ret=$? stop_smbd + +exit $ret diff --git a/source3/script/tests/t_002.sh b/source3/script/tests/t_002.sh new file mode 100644 index 0000000000..48987262a7 --- /dev/null +++ b/source3/script/tests/t_002.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +. $SCRIPTDIR/functions + +cat >$CONFFILE< Date: Wed, 24 Aug 2005 13:09:13 +0000 Subject: r9583: ensure that Samba was with with --enable-socket-wrapper for running 'make test' (This used to be commit 019155e748d9e04150bae39676362b794c1b6043) --- source3/script/tests/runtests.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'source3/script') diff --git a/source3/script/tests/runtests.sh b/source3/script/tests/runtests.sh index b814ad91e7..bb599ea3ec 100644 --- a/source3/script/tests/runtests.sh +++ b/source3/script/tests/runtests.sh @@ -44,6 +44,19 @@ export PRIVATEDIR LIBDIR PIDDIR LOCKDIR TMPDIR LOGDIR export SRCDIR SCRIPTDIR export USERNAME PASSWORD + +## +## verify that we were built with --enable-socket-wrapper +## + +if test "x`smbd -b | grep SOCKET_WRAPPER`" == "x"; then + echo "***" + echo "*** You must include --enable-socket-wrapper when compiling Samba" + echo "*** in order to execute 'make test'. Exiting...." + echo "***" + exit 1 +fi + ## ## create the test directory layout ## -- cgit From 38d08ad68c44304fe151b518f41a232bcc762261 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 24 Aug 2005 13:27:24 +0000 Subject: r9585: update test #1 (This used to be commit 7a150ffde5cb8eb5198ac351161c3d651fb279a9) --- source3/script/tests/t_001.sh | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/script') diff --git a/source3/script/tests/t_001.sh b/source3/script/tests/t_001.sh index 77b023c4c4..995cfb11eb 100644 --- a/source3/script/tests/t_001.sh +++ b/source3/script/tests/t_001.sh @@ -5,6 +5,7 @@ cat >$CONFFILE< Date: Thu, 25 Aug 2005 12:44:37 +0000 Subject: r9613: remove TMPDIR from 'make test' scripts (after comments by Don Watson) (This used to be commit 0626bb68411225d5402221ec9b305390393c38e5) --- source3/script/tests/runtests.sh | 7 +++---- source3/script/tests/t_001.sh | 6 +++++- source3/script/tests/t_002.sh | 7 ++++++- 3 files changed, 14 insertions(+), 6 deletions(-) (limited to 'source3/script') diff --git a/source3/script/tests/runtests.sh b/source3/script/tests/runtests.sh index bb599ea3ec..a5dc3ecfb4 100644 --- a/source3/script/tests/runtests.sh +++ b/source3/script/tests/runtests.sh @@ -28,7 +28,7 @@ PASSWORD=test SRCDIR=`pwd` SCRIPTDIR=$SRCDIR/script/tests -TMPDIR=$PREFIX_ABS/tmp +SHRDIR=$PREFIX_ABS/tmp LIBDIR=$PREFIX_ABS/lib PIDDIR=$PREFIX_ABS/pid CONFFILE=$LIBDIR/smb.conf @@ -40,7 +40,7 @@ CONFIGURATION="-s $CONFFILE" PATH=`pwd`/bin:$PATH export PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR DOMAIN -export PRIVATEDIR LIBDIR PIDDIR LOCKDIR TMPDIR LOGDIR +export PRIVATEDIR LIBDIR PIDDIR LOCKDIR LOGDIR export SRCDIR SCRIPTDIR export USERNAME PASSWORD @@ -62,8 +62,7 @@ fi ## /bin/rm -rf $PREFIX/* -mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $TMPDIR $LOGDIR $SOCKET_WRAPPER_DIR -chmod 1777 $TMPDIR +mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $LOGDIR $SOCKET_WRAPPER_DIR ## ## Create the common config include file with the basic settings diff --git a/source3/script/tests/t_001.sh b/source3/script/tests/t_001.sh index 995cfb11eb..6d54d0e489 100644 --- a/source3/script/tests/t_001.sh +++ b/source3/script/tests/t_001.sh @@ -8,7 +8,7 @@ cat >$CONFFILE<$CONFFILE< Date: Thu, 25 Aug 2005 13:53:09 +0000 Subject: r9615: trying a 3 second timeout on smbcontrol (This used to be commit 4e62a51bf68e8ef19beed63a7520e0db20321b11) --- source3/script/tests/functions | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'source3/script') diff --git a/source3/script/tests/functions b/source3/script/tests/functions index 40e185e153..13139f6d8f 100644 --- a/source3/script/tests/functions +++ b/source3/script/tests/functions @@ -2,13 +2,16 @@ ## library file for test functions ## + +SMBCONTROL="smbcontrol -t 3" + ## ## start/stop smbd daemon ## check_smbd_running() { ## the smbcontrol ping will return a 0 on success - smbcontrol $CONFIGURATION smbd ping 2>&1 > /dev/null + $SMBCONTROL $CONFIGURATION smbd ping 2>&1 > /dev/null } start_smbd() @@ -19,7 +22,7 @@ start_smbd() sleep 1 - smbcontrol $CONFIGURATION `cat $PIDDIR/smbd.pid` ping 2>&1 > /dev/null || return $? + $SMBCONTROL $CONFIGURATION `cat $PIDDIR/smbd.pid` ping 2>&1 > /dev/null || return $? } stop_smbd() @@ -30,7 +33,7 @@ stop_smbd() ## belt and braces; first kill and then send a shutdown message kill -TERM $smbd_pid - smbcontrol $CONFIGURATION smbd shutdown + $SMBCONTROL $CONFIGURATION smbd shutdown ## check to see if smbd is already running check_smbd_running @@ -47,7 +50,7 @@ stop_smbd() check_nmbd_running() { ## the smbcontrol ping will return a 0 on success - smbcontrol $CONFIGURATION nmbd ping 2>&1 > /dev/null + $SMBCONTROL $CONFIGURATION nmbd ping 2>&1 > /dev/null } start_nmbd() -- cgit From 013ac99a9dce268dcc46bccb8754aacced931157 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 25 Aug 2005 17:15:23 +0000 Subject: r9618: adding get/put tests from Don Watson (This used to be commit a94de276aec174bc05406ff52568e9fcd05c114e) --- source3/script/tests/functions | 11 ++++++++++- source3/script/tests/t_001.sh | 22 ++++++++++++++++++++-- 2 files changed, 30 insertions(+), 3 deletions(-) (limited to 'source3/script') diff --git a/source3/script/tests/functions b/source3/script/tests/functions index 13139f6d8f..0981d9e29e 100644 --- a/source3/script/tests/functions +++ b/source3/script/tests/functions @@ -43,9 +43,18 @@ stop_smbd() fi } +check_ret_value() +{ + ret=$@ + + if test $ret != 0; then + stop_smbd + exit $ret + fi +} ## -## start/stop smbd daemon +## start/stop nmbd daemon ## check_nmbd_running() { diff --git a/source3/script/tests/t_001.sh b/source3/script/tests/t_001.sh index 6d54d0e489..7db2abe226 100644 --- a/source3/script/tests/t_001.sh +++ b/source3/script/tests/t_001.sh @@ -22,9 +22,27 @@ chmod 1777 $PREFIX_ABS/tmp start_smbd || exit $? +## share enumeration + smbclient $CONFIGURATION -L localhost -N -p 139 -ret=$? +check_ret_value $? + +testfile=`echo $CONFIGURATION | awk '{print $2}'` +filename=`basename $testfile` +dirname=`dirname $testfile` + + +# file get/put + +smbclient //localhost/test $PASSWORD $CONFIGURATION -c "lcd $dirname; put $filename" +check_ret_value $? + +smbclient //localhost/test $PASSWORD $CONFIGURATION -c "get $filename; rm $filename" +check_ret_value $? + +diff $filename $testfile 2> /dev/null > /dev/null +check_ret_value $? stop_smbd +exit 0 -exit $ret -- cgit From 54abd2aa66069e6baf7769c496f46d9dba18db39 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 30 Sep 2005 17:13:37 +0000 Subject: r10656: BIG merge from trunk. Features not copied over * \PIPE\unixinfo * winbindd's {group,alias}membership new functions * winbindd's lookupsids() functionality * swat (trunk changes to be reverted as per discussion with Deryck) (This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3) --- source3/script/installman.sh | 2 +- source3/script/installswat.sh | 22 +++++++++++++++++----- source3/script/mkproto.awk | 2 +- source3/script/tests/functions | 22 +++++----------------- source3/script/tests/t_001.sh | 22 ++-------------------- 5 files changed, 26 insertions(+), 44 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 9cd9100839..5564ac0231 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -13,7 +13,7 @@ if [ $# -ge 4 ] ; then GROFF=$4 # sh cmd line, including options fi -if test ! -d ../docs/manpages; then +if test ! -d docs/manpages; then echo "No manpages present. SVN development version maybe?" exit 0 fi diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 2b99b9c57f..cba3a294f8 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -3,7 +3,7 @@ SWATDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2/ -BOOKDIR=$SWATDIR/help/using_samba +BOOKDIR=$SWATDIR/using_samba echo Installing SWAT in $SWATDIR echo Installing the Samba Web Administration Tool @@ -14,7 +14,7 @@ echo Installing langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` for ln in $LANGS; do SWATLANGDIR=$SWATDIR/$ln for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \ - $SWATLANGDIR/include; do + $SWATLANGDIR/include $SWATLANGDIR/js; do if [ ! -d $d ]; then mkdir -p $d if [ ! -d $d ]; then @@ -28,7 +28,7 @@ done # Install images for ln in $LANGS; do - for f in $SRCDIR../swat/$ln/images/*.gif; do + for f in $SRCDIR../swat/$ln/images/*.png; do if [ ! -f $f ] ; then continue fi @@ -59,7 +59,7 @@ for ln in $LANGS; do # Install "server-side" includes - for f in $SRCDIR../swat/$ln/include/*.html; do + for f in $SRCDIR../swat/$ln/include/*; do if [ ! -f $f ] ; then continue fi @@ -69,13 +69,25 @@ for ln in $LANGS; do chmod 0644 $FNAME done + # Install javascripts + + for f in $SRCDIR../swat/$ln/js/*.js; do + if [ ! -f $f ] ; then + continue + fi + FNAME=$SWATDIR/$ln/js/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done + done # Install html documentation (if html documentation tree is here) if [ -d $SRCDIR../docs/htmldocs/ ]; then - for dir in htmldocs/manpages htmldocs/Samba3-ByExample htmldocs/Samba3-Developers-Guide htmldocs/Samba3-HOWTO + for dir in htmldocs/ htmldocs/Samba-HOWTO-Collection htmldocs/Samba-Guide htmldocs/Samba-Developers-Guide do if [ ! -d $SRCDIR../docs/$dir ]; then diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 3940c34700..73a1c2b3f0 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -128,7 +128,7 @@ END { gotstart = 1; } - if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^DEVICEMODE|^PAC_DATA|^NET_USER_INFO_3|^smb_event_id_t/ ) { + if( $0 ~ /^SAM_ACCT_INFO_NODE|^SMB_ACL_T|^ADS_MODLIST|^PyObject|^SORTED_TREE|^REGISTRY_HOOK|^REGISTRY_VALUE|^REGVAL_CTR|^DEVICEMODE|^PAC_DATA|^NET_USER_INFO_3|^smb_event_id_t/ ) { gotstart = 1; } diff --git a/source3/script/tests/functions b/source3/script/tests/functions index 0981d9e29e..40e185e153 100644 --- a/source3/script/tests/functions +++ b/source3/script/tests/functions @@ -2,16 +2,13 @@ ## library file for test functions ## - -SMBCONTROL="smbcontrol -t 3" - ## ## start/stop smbd daemon ## check_smbd_running() { ## the smbcontrol ping will return a 0 on success - $SMBCONTROL $CONFIGURATION smbd ping 2>&1 > /dev/null + smbcontrol $CONFIGURATION smbd ping 2>&1 > /dev/null } start_smbd() @@ -22,7 +19,7 @@ start_smbd() sleep 1 - $SMBCONTROL $CONFIGURATION `cat $PIDDIR/smbd.pid` ping 2>&1 > /dev/null || return $? + smbcontrol $CONFIGURATION `cat $PIDDIR/smbd.pid` ping 2>&1 > /dev/null || return $? } stop_smbd() @@ -33,7 +30,7 @@ stop_smbd() ## belt and braces; first kill and then send a shutdown message kill -TERM $smbd_pid - $SMBCONTROL $CONFIGURATION smbd shutdown + smbcontrol $CONFIGURATION smbd shutdown ## check to see if smbd is already running check_smbd_running @@ -43,23 +40,14 @@ stop_smbd() fi } -check_ret_value() -{ - ret=$@ - - if test $ret != 0; then - stop_smbd - exit $ret - fi -} ## -## start/stop nmbd daemon +## start/stop smbd daemon ## check_nmbd_running() { ## the smbcontrol ping will return a 0 on success - $SMBCONTROL $CONFIGURATION nmbd ping 2>&1 > /dev/null + smbcontrol $CONFIGURATION nmbd ping 2>&1 > /dev/null } start_nmbd() diff --git a/source3/script/tests/t_001.sh b/source3/script/tests/t_001.sh index 7db2abe226..6d54d0e489 100644 --- a/source3/script/tests/t_001.sh +++ b/source3/script/tests/t_001.sh @@ -22,27 +22,9 @@ chmod 1777 $PREFIX_ABS/tmp start_smbd || exit $? -## share enumeration - smbclient $CONFIGURATION -L localhost -N -p 139 -check_ret_value $? - -testfile=`echo $CONFIGURATION | awk '{print $2}'` -filename=`basename $testfile` -dirname=`dirname $testfile` - - -# file get/put - -smbclient //localhost/test $PASSWORD $CONFIGURATION -c "lcd $dirname; put $filename" -check_ret_value $? - -smbclient //localhost/test $PASSWORD $CONFIGURATION -c "get $filename; rm $filename" -check_ret_value $? - -diff $filename $testfile 2> /dev/null > /dev/null -check_ret_value $? +ret=$? stop_smbd -exit 0 +exit $ret -- cgit From 75a29f80eb86386c7a320b3ce4d417803ec8910f Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 1 Oct 2005 19:41:29 +0000 Subject: r10676: reverting bad merge for install manpages script (This used to be commit 50549fa9b3f6d6eaf7da70cb8d7595b32917aade) --- source3/script/installman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 5564ac0231..9cd9100839 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -13,7 +13,7 @@ if [ $# -ge 4 ] ; then GROFF=$4 # sh cmd line, including options fi -if test ! -d docs/manpages; then +if test ! -d ../docs/manpages; then echo "No manpages present. SVN development version maybe?" exit 0 fi -- cgit From 47e297bc8de7bed9de5fc7ce2456c1d414301eca Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 11 Oct 2005 16:12:40 +0000 Subject: r10904: build patches from Marc Balmer when builddir!=srcdir (This used to be commit b7fc4045185f2f0ec27aa72656163e9249ad7b85) --- source3/script/installman.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 9cd9100839..6278012635 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -13,7 +13,7 @@ if [ $# -ge 4 ] ; then GROFF=$4 # sh cmd line, including options fi -if test ! -d ../docs/manpages; then +if test ! -d $SRCDIR../docs/manpages; then echo "No manpages present. SVN development version maybe?" exit 0 fi -- cgit From 63937fec90338fb5affe2d8cb2a568edae320acd Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 18 Oct 2005 17:20:50 +0000 Subject: r11152: fix some regressions caused by the trunk->3.0 merge when install docs with SWAT (This used to be commit e3c68738663701fde21baef03c36de303e7f1636) --- source3/script/installswat.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index cba3a294f8..c5c285894e 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -87,7 +87,7 @@ done if [ -d $SRCDIR../docs/htmldocs/ ]; then - for dir in htmldocs/ htmldocs/Samba-HOWTO-Collection htmldocs/Samba-Guide htmldocs/Samba-Developers-Guide + for dir in htmldocs/manpages htmldocs/Samba3-ByExample htmldocs/Samba3-Developers-Guide htmldocs/Samba3-HOWTO do if [ ! -d $SRCDIR../docs/$dir ]; then -- cgit From 580ef1f81e8f8ee02a4300366029cedbac65413e Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Thu, 20 Oct 2005 12:58:40 +0000 Subject: r11224: Add feature to get our configuration from config.log into installman.sh. This allows us to install for example smbsh.1 only if SMBWRAPPER is set. Removed also one rm call as we copy and do not append to the same file in the next step. There is no file permission risk as we chmod 0644 in any case later. Replaced one basename call by shell substitution. (This used to be commit 3944dfbff4f7f951d35e7893f7ab56ed2e9d76b0) --- source3/script/installman.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 6278012635..e9b068a9f6 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -18,6 +18,10 @@ if test ! -d $SRCDIR../docs/manpages; then exit 0 fi +# Get the configured feature set +test -f config.log && \ + eval $( grep "^[[:alnum:]]*=.*" config.log) + for lang in $langs; do if [ "X$lang" = XC ]; then echo Installing default man pages in $MANDIR/ @@ -40,13 +44,20 @@ for lang in $langs; do for sect in 1 5 7 8 ; do for m in $langdir/man$sect ; do for s in $SRCDIR../docs/manpages/$lang/*$sect; do - FNAME=$m/`basename $s` - + MP_BASENAME=${s##*/} + + # Check if this man page if required by the configured feature set + case "${MP_BASENAME}" in + smbsh.1) test -z "${SMBWRAPPER}" && continue ;; + *) ;; + esac + + FNAME="$m/${MP_BASENAME}" + # Test for writability. Involves # blowing away existing files. if (rm -f $FNAME && touch $FNAME); then - rm $FNAME if [ "x$GROFF" = x ] ; then cp $s $m # Copy raw nroff else -- cgit From f8cb37ab19cc9499c23a1e1f40427ed48b707870 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 11 Nov 2005 21:11:33 +0000 Subject: r11685: reverting Lar's change to nistallman from r11224 since it breaks 'make installman' outside the source tree; will fix up after the rc1 release (This used to be commit 61e7366e0f545e8ef1aad45a3ab3f6aac1ca6049) --- source3/script/installman.sh | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index e9b068a9f6..6278012635 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -18,10 +18,6 @@ if test ! -d $SRCDIR../docs/manpages; then exit 0 fi -# Get the configured feature set -test -f config.log && \ - eval $( grep "^[[:alnum:]]*=.*" config.log) - for lang in $langs; do if [ "X$lang" = XC ]; then echo Installing default man pages in $MANDIR/ @@ -44,20 +40,13 @@ for lang in $langs; do for sect in 1 5 7 8 ; do for m in $langdir/man$sect ; do for s in $SRCDIR../docs/manpages/$lang/*$sect; do - MP_BASENAME=${s##*/} - - # Check if this man page if required by the configured feature set - case "${MP_BASENAME}" in - smbsh.1) test -z "${SMBWRAPPER}" && continue ;; - *) ;; - esac - - FNAME="$m/${MP_BASENAME}" - + FNAME=$m/`basename $s` + # Test for writability. Involves # blowing away existing files. if (rm -f $FNAME && touch $FNAME); then + rm $FNAME if [ "x$GROFF" = x ] ; then cp $s $m # Copy raw nroff else -- cgit From ba2edc38aa6bce492817b395f196d3d2f2f0bda9 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Mon, 14 Nov 2005 21:18:09 +0000 Subject: r11728: Ensure to check for the config.log in ${SRCDIR}. Revert jerry's revert from 11685. :) At the moment I don't see a way to check if there is an empty ${SMBWRAPPER} or none. If there is a way to check if ${SMBWRAPPER} isn't set at all we could make the installman script even work if config.log does not exist. (This used to be commit 3e3113a1fab282c0f652340d1027bb614ef93ec3) --- source3/script/installman.sh | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 6278012635..3bbca1a8aa 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -18,6 +18,10 @@ if test ! -d $SRCDIR../docs/manpages; then exit 0 fi +# Get the configured feature set +test -f "${SRCDIR}/config.log" && \ + eval $( grep "^[[:alnum:]]*=.*" "${SRCDIR}/config.log") + for lang in $langs; do if [ "X$lang" = XC ]; then echo Installing default man pages in $MANDIR/ @@ -40,13 +44,20 @@ for lang in $langs; do for sect in 1 5 7 8 ; do for m in $langdir/man$sect ; do for s in $SRCDIR../docs/manpages/$lang/*$sect; do - FNAME=$m/`basename $s` - + MP_BASENAME=${s##*/} + + # Check if this man page if required by the configured feature set + case "${MP_BASENAME}" in + smbsh.1) test -z "${SMBWRAPPER}" && continue ;; + *) ;; + esac + + FNAME="$m/${MP_BASENAME}" + # Test for writability. Involves # blowing away existing files. if (rm -f $FNAME && touch $FNAME); then - rm $FNAME if [ "x$GROFF" = x ] ; then cp $s $m # Copy raw nroff else -- cgit From 5251618c7fff7635a4b64072f88eaf5e4e25761e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 17 Nov 2005 20:08:59 +0000 Subject: r11761: * fix clearing of event logs by truncating the tdb. This feature got broken in some of the other updates. Now each open handle stores an pointer to an open tdb data structure (not the tdb pointer itself). Clearing can be done with a simple elog_close_tdb( elog, True ) to force a close and then calling elog_open_tdb( logname, True ) to force an tdb truncate. Permissions on existing tdbs are maintained which is important. * We don't currently handle backup. Haven't looked at the format of a backuped up eventlog to know what the deal is. (This used to be commit 2df34c9403446d12f1ceeac38cbda5d3ba805b02) --- source3/script/mkproto.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkproto.awk b/source3/script/mkproto.awk index 73a1c2b3f0..a0f3096c84 100644 --- a/source3/script/mkproto.awk +++ b/source3/script/mkproto.awk @@ -136,7 +136,7 @@ END { gotstart = 1; } - if( $0 ~ /^NODE_STATUS_STRUCT|SMB_STRUCT_DIR/ ) { + if( $0 ~ /^NODE_STATUS_STRUCT|SMB_STRUCT_DIR|ELOG_TDB/ ) { gotstart = 1; } -- cgit From 03b77baa6f20b8eaa450e67b0e0e1ad6f5b686be Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Sat, 3 Dec 2005 01:03:16 +0000 Subject: r12040: merging packaging fixes from release branch (This used to be commit 47a9f2c3d6039a07a6970ac181aeb2888d47a353) --- source3/script/installman.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 3bbca1a8aa..9235217ff0 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -19,8 +19,7 @@ if test ! -d $SRCDIR../docs/manpages; then fi # Get the configured feature set -test -f "${SRCDIR}/config.log" && \ - eval $( grep "^[[:alnum:]]*=.*" "${SRCDIR}/config.log") +test -f "${SRCDIR}/config.log" && eval `grep '^[A-Za-z0-9]*=.*' ${SRCDIR}/config.log` for lang in $langs; do if [ "X$lang" = XC ]; then @@ -44,7 +43,7 @@ for lang in $langs; do for sect in 1 5 7 8 ; do for m in $langdir/man$sect ; do for s in $SRCDIR../docs/manpages/$lang/*$sect; do - MP_BASENAME=${s##*/} + MP_BASENAME=`basename $s` # Check if this man page if required by the configured feature set case "${MP_BASENAME}" in -- cgit From 67e8af8527d08d97736f9d1468d4ccd582940f44 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 20 Dec 2005 02:23:51 +0000 Subject: r12393: cleaning up swat bugs. *no one* tests swat it seems. This has been broken since r10656 (This used to be commit 85ea7afd8bd30e0a2bcbc7181f75fde63b016a34) --- source3/script/installswat.sh | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index c5c285894e..c66fd29485 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -3,7 +3,7 @@ SWATDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2/ -BOOKDIR=$SWATDIR/using_samba +BOOKDIR=$SWATDIR/help/using_samba echo Installing SWAT in $SWATDIR echo Installing the Samba Web Administration Tool @@ -14,7 +14,7 @@ echo Installing langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` for ln in $LANGS; do SWATLANGDIR=$SWATDIR/$ln for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \ - $SWATLANGDIR/include $SWATLANGDIR/js; do + $SWATLANGDIR/include; do if [ ! -d $d ]; then mkdir -p $d if [ ! -d $d ]; then @@ -28,7 +28,7 @@ done # Install images for ln in $LANGS; do - for f in $SRCDIR../swat/$ln/images/*.png; do + for f in $SRCDIR../swat/$ln/images/*.gif; do if [ ! -f $f ] ; then continue fi @@ -59,7 +59,7 @@ for ln in $LANGS; do # Install "server-side" includes - for f in $SRCDIR../swat/$ln/include/*; do + for f in $SRCDIR../swat/$ln/include/*.html; do if [ ! -f $f ] ; then continue fi @@ -69,18 +69,6 @@ for ln in $LANGS; do chmod 0644 $FNAME done - # Install javascripts - - for f in $SRCDIR../swat/$ln/js/*.js; do - if [ ! -f $f ] ; then - continue - fi - FNAME=$SWATDIR/$ln/js/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME - done - done # Install html documentation (if html documentation tree is here) -- cgit From e2de656314c8d50bfd5f14b24826a2df962fe704 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 18 Jan 2006 04:44:59 +0000 Subject: r12990: BUG 3329: patch from David May for Solaris shell script portability issues in 'make test' (This used to be commit 19339a9510467b4b2cf3889bc6a08563cdc940f4) --- source3/script/tests/functions | 4 ++-- source3/script/tests/runtests.sh | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'source3/script') diff --git a/source3/script/tests/functions b/source3/script/tests/functions index 40e185e153..8cb8f0b155 100644 --- a/source3/script/tests/functions +++ b/source3/script/tests/functions @@ -34,7 +34,7 @@ stop_smbd() ## check to see if smbd is already running check_smbd_running - if test $? == 0; then + if test $? = 0; then echo "Unable to stop smbd!" exit 2 fi @@ -74,7 +74,7 @@ stop_nmbd() ## check to see if smbd is already running kill -0 $nmbd_pid 2> /dev/null - if test $? == 0; then + if test $? = 0; then echo "Unable to stop nmbd!" exit 2 fi diff --git a/source3/script/tests/runtests.sh b/source3/script/tests/runtests.sh index a5dc3ecfb4..ddaf94e8ac 100644 --- a/source3/script/tests/runtests.sh +++ b/source3/script/tests/runtests.sh @@ -1,11 +1,11 @@ #!/bin/sh -if [ "x$1" == "x" ]; then +if [ "x$1" = "x" ]; then echo "$0 " exit 1 fi -if [ $# == 2 ]; then +if [ $# = 2 ]; then testnum=$2 fi @@ -49,7 +49,7 @@ export USERNAME PASSWORD ## verify that we were built with --enable-socket-wrapper ## -if test "x`smbd -b | grep SOCKET_WRAPPER`" == "x"; then +if test "x`smbd -b | grep SOCKET_WRAPPER`" = "x"; then echo "***" echo "*** You must include --enable-socket-wrapper when compiling Samba" echo "*** in order to execute 'make test'. Exiting...." -- cgit From 19907887fcc1fa96f947298da752f410eb23ad1e Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 23 Jan 2006 22:02:52 +0000 Subject: r13093: adding vendor patch level string as announced on samba-technical ml (This used to be commit d40f06018b9197c35a10cc9ab284dd596244f47b) --- source3/script/mkversion.sh | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'source3/script') diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh index 9d919cfe34..1ba7cd6369 100755 --- a/source3/script/mkversion.sh +++ b/source3/script/mkversion.sh @@ -1,5 +1,4 @@ #!/bin/sh -# VERSION_FILE=$1 OUTPUT_FILE=$2 @@ -17,16 +16,12 @@ SOURCE_DIR=$3 SAMBA_VERSION_MAJOR=`sed -n 's/^SAMBA_VERSION_MAJOR=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_MINOR=`sed -n 's/^SAMBA_VERSION_MINOR=//p' $SOURCE_DIR$VERSION_FILE` SAMBA_VERSION_RELEASE=`sed -n 's/^SAMBA_VERSION_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` - SAMBA_VERSION_REVISION=`sed -n 's/^SAMBA_VERSION_REVISION=//p' $SOURCE_DIR$VERSION_FILE` - SAMBA_VERSION_PRE_RELEASE=`sed -n 's/^SAMBA_VERSION_PRE_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` - SAMBA_VERSION_RC_RELEASE=`sed -n 's/^SAMBA_VERSION_RC_RELEASE=//p' $SOURCE_DIR$VERSION_FILE` - SAMBA_VERSION_IS_SVN_SNAPSHOT=`sed -n 's/^SAMBA_VERSION_IS_SVN_SNAPSHOT=//p' $SOURCE_DIR$VERSION_FILE` - SAMBA_VERSION_VENDOR_SUFFIX=`sed -n 's/^SAMBA_VERSION_VENDOR_SUFFIX=//p' $SOURCE_DIR$VERSION_FILE` +SAMBA_VENDOR_PATCH=`sed -n 's/^SAMBA_VENDOR_PATCH=//p' $SOURCE_DIR$VERSION_FILE` echo "/* Autogenerated by script/mkversion.sh */" > $OUTPUT_FILE @@ -35,13 +30,21 @@ echo "#define SAMBA_VERSION_MINOR ${SAMBA_VERSION_MINOR}" >> $OUTPUT_FILE echo "#define SAMBA_VERSION_RELEASE ${SAMBA_VERSION_RELEASE}" >> $OUTPUT_FILE +## +## start with "3.0.22" +## SAMBA_VERSION_STRING="${SAMBA_VERSION_MAJOR}.${SAMBA_VERSION_MINOR}.${SAMBA_VERSION_RELEASE}" +## +## maybe add "3.0.22a" or "3.0.22pre1" or "3.0.22rc1" +## We do not do pre or rc version on patch/letter releases +## if test -n "${SAMBA_VERSION_REVISION}";then SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}${SAMBA_VERSION_REVISION}" echo "#define SAMBA_VERSION_REVISION \"${SAMBA_VERSION_REVISION}\"" >> $OUTPUT_FILE elif test -n "${SAMBA_VERSION_PRE_RELEASE}";then + ## maybe add "3.0.22pre2" SAMBA_VERSION_STRING="${SAMBA_VERSION_STRING}pre${SAMBA_VERSION_PRE_RELEASE}" echo "#define SAMBA_VERSION_PRE_RELEASE ${SAMBA_VERSION_PRE_RELEASE}" >> $OUTPUT_FILE elif test -n "${SAMBA_VERSION_RC_RELEASE}";then @@ -49,7 +52,21 @@ elif test -n "${SAMBA_VERSION_RC_RELEASE}";then echo "#define SAMBA_VERSION_RC_RELEASE ${SAMBA_VERSION_RC_RELEASE}" >> $OUTPUT_FILE fi +## +## Add the vendor string if present +## +if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then + echo "#define SAMBA_VERSION_VENDOR_SUFFIX ${SAMBA_VERSION_VENDOR_SUFFIX}" >> $OUTPUT_FILE + if test -n "${SAMBA_VENDOR_PATCH}";then + echo "#define SAMBA_VENDOR_PATCH ${SAMBA_VENDOR_PATCH}" >> $OUTPUT_FILE + fi +fi + + +## +## SVN revision number? +## if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then _SAVE_LANG=${LANG} LANG="" @@ -78,10 +95,6 @@ if test x"${SAMBA_VERSION_IS_SVN_SNAPSHOT}" = x"yes";then LANG=${_SAVE_LANG} fi -if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then - echo "#define SAMBA_VERSION_VENDOR_SUFFIX ${SAMBA_VERSION_VENDOR_SUFFIX}" >> $OUTPUT_FILE -fi - echo "#define SAMBA_VERSION_OFFICIAL_STRING \"${SAMBA_VERSION_STRING}\"" >> $OUTPUT_FILE echo "#define SAMBA_VERSION_STRING samba_version_string()" >> $OUTPUT_FILE -- cgit From 7de55b30b739ac59f22c9e8ed91e36662e5b5b12 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 30 Jan 2006 13:32:41 +0000 Subject: r13229: * fix bad comparison caught by the AIX compiler in wbinfo code * update output from mkversion.sh to include the SAMBA_VENDOR_PATCH (This used to be commit 485f0370942880a71095da5096e414b28193b150) --- source3/script/mkversion.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source3/script') diff --git a/source3/script/mkversion.sh b/source3/script/mkversion.sh index 1ba7cd6369..5784054921 100755 --- a/source3/script/mkversion.sh +++ b/source3/script/mkversion.sh @@ -102,7 +102,12 @@ echo "#define SAMBA_VERSION_STRING samba_version_string()" >> $OUTPUT_FILE echo "$0: 'include/version.h' created for Samba(\"${SAMBA_VERSION_STRING}\")" if test -n "${SAMBA_VERSION_VENDOR_SUFFIX}";then - echo "$0: with VENDOR_SUFFIX = ${SAMBA_VERSION_VENDOR_SUFFIX}" + echo -n "$0: with VENDOR_SUFFIX = \"" + echo -n ${SAMBA_VERSION_VENDOR_SUFFIX} | sed 's/"//g' + if test -n ${SAMBA_VENDOR_PATCH}; then + echo -n "-${SAMBA_VENDOR_PATCH}" + fi + echo "\"" fi exit 0 -- cgit From 0af1500fc0bafe61019f1b2ab1d9e1d369221240 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Fri, 3 Feb 2006 22:19:41 +0000 Subject: r13316: Let the carnage begin.... Sync with trunk as off r13315 (This used to be commit 17e63ac4ed8325c0d44fe62b2442449f3298559f) --- source3/script/installman.sh | 5 +++-- source3/script/installswat.sh | 20 ++++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installman.sh b/source3/script/installman.sh index 9235217ff0..3bbca1a8aa 100755 --- a/source3/script/installman.sh +++ b/source3/script/installman.sh @@ -19,7 +19,8 @@ if test ! -d $SRCDIR../docs/manpages; then fi # Get the configured feature set -test -f "${SRCDIR}/config.log" && eval `grep '^[A-Za-z0-9]*=.*' ${SRCDIR}/config.log` +test -f "${SRCDIR}/config.log" && \ + eval $( grep "^[[:alnum:]]*=.*" "${SRCDIR}/config.log") for lang in $langs; do if [ "X$lang" = XC ]; then @@ -43,7 +44,7 @@ for lang in $langs; do for sect in 1 5 7 8 ; do for m in $langdir/man$sect ; do for s in $SRCDIR../docs/manpages/$lang/*$sect; do - MP_BASENAME=`basename $s` + MP_BASENAME=${s##*/} # Check if this man page if required by the configured feature set case "${MP_BASENAME}" in diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index c66fd29485..c5c285894e 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -3,7 +3,7 @@ SWATDIR=`echo $1 | sed 's/\/\//\//g'` SRCDIR=$2/ -BOOKDIR=$SWATDIR/help/using_samba +BOOKDIR=$SWATDIR/using_samba echo Installing SWAT in $SWATDIR echo Installing the Samba Web Administration Tool @@ -14,7 +14,7 @@ echo Installing langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` for ln in $LANGS; do SWATLANGDIR=$SWATDIR/$ln for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \ - $SWATLANGDIR/include; do + $SWATLANGDIR/include $SWATLANGDIR/js; do if [ ! -d $d ]; then mkdir -p $d if [ ! -d $d ]; then @@ -28,7 +28,7 @@ done # Install images for ln in $LANGS; do - for f in $SRCDIR../swat/$ln/images/*.gif; do + for f in $SRCDIR../swat/$ln/images/*.png; do if [ ! -f $f ] ; then continue fi @@ -59,7 +59,7 @@ for ln in $LANGS; do # Install "server-side" includes - for f in $SRCDIR../swat/$ln/include/*.html; do + for f in $SRCDIR../swat/$ln/include/*; do if [ ! -f $f ] ; then continue fi @@ -69,6 +69,18 @@ for ln in $LANGS; do chmod 0644 $FNAME done + # Install javascripts + + for f in $SRCDIR../swat/$ln/js/*.js; do + if [ ! -f $f ] ; then + continue + fi + FNAME=$SWATDIR/$ln/js/`basename $f` + echo $FNAME + cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? + chmod 0644 $FNAME + done + done # Install html documentation (if html documentation tree is here) -- cgit From ca0e155ef015adfaf6a9c38518e8d60adcc3fdf9 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Wed, 22 Feb 2006 21:41:14 +0000 Subject: r13642: Fix install* scripts to use DESTDIR. Always pass the INSTALLPERMS and DESTDIR as first and second arg to the scripts. No longer prepend DESTDIR to the remaining args. To fix bug #3282 it is important _not_ to prepend DESTDIR to the source of the sym link pointing to smbmount. (This used to be commit c38adf71317f2c898ee10cad8068e942835199c9) --- source3/script/installbin.sh | 12 ++++++------ source3/script/installdirs.sh | 16 ++++++++++------ source3/script/installmodules.sh | 20 +++++++++++--------- 3 files changed, 27 insertions(+), 21 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh index f9fd5298c0..2f15ce595a 100755 --- a/source3/script/installbin.sh +++ b/source3/script/installbin.sh @@ -15,13 +15,13 @@ shift for p in $*; do p2=`basename $p` - echo Installing $p as $BINDIR/$p2 - if [ -f $BINDIR/$p2 ]; then - rm -f $BINDIR/$p2.old - mv $BINDIR/$p2 $BINDIR/$p2.old + echo Installing $p as $DESTDIR/$BINDIR/$p2 + if [ -f $DESTDIR/$BINDIR/$p2 ]; then + rm -f $DESTDIR/$BINDIR/$p2.old + mv $DESTDIR/$BINDIR/$p2 $DESTDIR/$BINDIR/$p2.old fi - cp $p $BINDIR/ - chmod $INSTALLPERMS $BINDIR/$p2 + cp $p $DESTDIR/$BINDIR/ + chmod $INSTALLPERMS $DESTDIR/$BINDIR/$p2 # this is a special case, mount needs this in a specific location if [ $p2 = smbmount ]; then diff --git a/source3/script/installdirs.sh b/source3/script/installdirs.sh index 1db46b82ff..db38a11b67 100755 --- a/source3/script/installdirs.sh +++ b/source3/script/installdirs.sh @@ -1,14 +1,18 @@ #!/bin/sh -while ( test -n "$1" ); do +INSTALLPERMS=$1 +DESTDIR=`echo $2 | sed 's/\/\//\//g'` +shift +shift - DIRNAME=`echo $1 | sed 's/\/\//\//g'` - if [ ! -d $DIRNAME ]; then - mkdir -p $DIRNAME +for dir in $@; do + DIRNAME=`echo $dir | sed 's/\/\//\//g'` + if [ ! -d $DESTDIR/$DIRNAME ]; then + mkdir -m $INSTALLPERMS -p $DESTDIR/$DIRNAME fi - if [ ! -d $DIRNAME ]; then - echo Failed to make directory $1 + if [ ! -d $DESTDIR/$DIRNAME ]; then + echo "Failed to make directory $DESTDIR/$DIRNAME " exit 1 fi diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh index f7c7473338..4ea8fde327 100755 --- a/source3/script/installmodules.sh +++ b/source3/script/installmodules.sh @@ -1,17 +1,19 @@ #!/bin/sh INSTALLPERMS=$1 -BASEDIR=`echo $2 | sed 's/\/\//\//g'` -LIBDIR=`echo $3 | sed 's/\/\//\//g'` +DESTDIR=`echo $2 | sed 's/\/\//\//g'` +BASEDIR=`echo $3 | sed 's/\/\//\//g'` +LIBDIR=`echo $4 | sed 's/\/\//\//g'` +shift shift shift shift for d in $BASEDIR $LIBDIR; do -if [ ! -d $d ]; then -mkdir $d -if [ ! -d $d ]; then - echo Failed to make directory $d +if [ ! -d $DESTDIR/$d ]; then +mkdir $DESTDIR/$d +if [ ! -d $DESTDIR/$d ]; then + echo Failed to make directory $DESTDIR/$d exit 1 fi fi @@ -19,9 +21,9 @@ done for p in $*; do p2=`basename $p` - echo Installing $p as $LIBDIR/$p2 - cp -f $p $LIBDIR/ - chmod $INSTALLPERMS $LIBDIR/$p2 + echo Installing $p as $DESTDIR/$LIBDIR/$p2 + cp -f $p $DESTDIR/$LIBDIR/ + chmod $INSTALLPERMS $DESTDIR/$LIBDIR/$p2 done exit 0 -- cgit From 95faa772c6d2df2e633b411a3f0f5337ad78ceb4 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Thu, 23 Feb 2006 01:05:51 +0000 Subject: r13643: Enable script debug output to get some more details why some hosts return with !=0 after calling installmodules.sh AUTH_MODULES. (This used to be commit 5a67b4f5be9960b24f5bb2ba0adcc25121c8a486) --- source3/script/installmodules.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source3/script') diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh index 4ea8fde327..47794d1135 100755 --- a/source3/script/installmodules.sh +++ b/source3/script/installmodules.sh @@ -19,6 +19,8 @@ fi fi done +set -x + for p in $*; do p2=`basename $p` echo Installing $p as $DESTDIR/$LIBDIR/$p2 @@ -26,4 +28,6 @@ for p in $*; do chmod $INSTALLPERMS $DESTDIR/$LIBDIR/$p2 done +set +x + exit 0 -- cgit From a71e4baaf6ad47282b0ef27142f97dcafe882c8c Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Thu, 23 Feb 2006 01:38:00 +0000 Subject: r13644: Do not shift anything inside the for loop away. We ineterate over $@. (This used to be commit 3aa75f0ff589a3fdeaa9daa5ae75b3381c3e8eea) --- source3/script/installdirs.sh | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installdirs.sh b/source3/script/installdirs.sh index db38a11b67..062b34b8c6 100755 --- a/source3/script/installdirs.sh +++ b/source3/script/installdirs.sh @@ -15,9 +15,4 @@ for dir in $@; do echo "Failed to make directory $DESTDIR/$DIRNAME " exit 1 fi - - shift; done - - - -- cgit From 55ccaee64ae113daf092d083a3eac3cf93c55ae3 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Thu, 23 Feb 2006 01:43:39 +0000 Subject: r13645: Revert debug output. (This used to be commit 3a6c9999b4d2327cfb45a2b2839e07a2b682278f) --- source3/script/installmodules.sh | 4 ---- 1 file changed, 4 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh index 47794d1135..4ea8fde327 100755 --- a/source3/script/installmodules.sh +++ b/source3/script/installmodules.sh @@ -19,8 +19,6 @@ fi fi done -set -x - for p in $*; do p2=`basename $p` echo Installing $p as $DESTDIR/$LIBDIR/$p2 @@ -28,6 +26,4 @@ for p in $*; do chmod $INSTALLPERMS $DESTDIR/$LIBDIR/$p2 done -set +x - exit 0 -- cgit From 9169edfeb4ea4358dbaf948372847542fb57464e Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Fri, 24 Feb 2006 00:30:09 +0000 Subject: r13663: make uninstall DESTDIR=/somewhere no longer leaves files. This is done with the new rules: uninstallservers uninstalldat, uninstallswat (calles uninstallmsg), uninstallmodules, uninstallclientlib, and uninstalllibmsrpc. We still leave directories. We might try to remove the dirs we created in reverse order. The new uninstall scripts are sym links to the respective install scripts. Inside we set mode to install or uninstall. installservers is now used to install the servers. These are no longer installed with installbin. (This used to be commit 43549301b937c060742840054017b31bf3781e04) --- source3/script/installbin.sh | 13 +- source3/script/installdat.sh | 62 +++++++-- source3/script/installmodules.sh | 2 +- source3/script/installmsg.sh | 64 +++++++-- source3/script/installswat.sh | 271 ++++++++++++++++++++++++++++--------- source3/script/uninstallbin.sh | 28 ++-- source3/script/uninstalldat.sh | 1 + source3/script/uninstallmodules.sh | 22 +-- source3/script/uninstallmsg.sh | 1 + source3/script/uninstallswat.sh | 1 + 10 files changed, 344 insertions(+), 121 deletions(-) create mode 120000 source3/script/uninstalldat.sh create mode 120000 source3/script/uninstallmsg.sh create mode 120000 source3/script/uninstallswat.sh (limited to 'source3/script') diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh index 2f15ce595a..8859c95341 100755 --- a/source3/script/installbin.sh +++ b/source3/script/installbin.sh @@ -2,20 +2,14 @@ INSTALLPERMS=$1 DESTDIR=$2 -BASEDIR=`echo $3 | sed 's/\/\//\//g'` -BINDIR=`echo $4 | sed 's/\/\//\//g'` -LIBDIR=`echo $5 | sed 's/\/\//\//g'` -VARDIR=`echo $6 | sed 's/\/\//\//g'` -shift -shift -shift +BINDIR=`echo $3 | sed 's/\/\//\//g'` shift shift shift for p in $*; do p2=`basename $p` - echo Installing $p as $DESTDIR/$BINDIR/$p2 + echo "Installing $p as $DESTDIR/$BINDIR/$p2 " if [ -f $DESTDIR/$BINDIR/$p2 ]; then rm -f $DESTDIR/$BINDIR/$p2.old mv $DESTDIR/$BINDIR/$p2 $DESTDIR/$BINDIR/$p2.old @@ -27,7 +21,8 @@ for p in $*; do if [ $p2 = smbmount ]; then if [ ! -d $DESTDIR/sbin ]; then mkdir $DESTDIR/sbin - fi + fi + echo "Creating sym link $DESTDIR/sbin/mount.smbfs to $BINDIR/$p2 " ln -sf $BINDIR/$p2 $DESTDIR/sbin/mount.smbfs fi done diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh index 4a5b1de5dc..5d7958e273 100755 --- a/source3/script/installdat.sh +++ b/source3/script/installdat.sh @@ -1,23 +1,65 @@ #!/bin/sh #fist version March 2002, Herb Lewis -DATDIR=`echo $1 | sed 's/\/\//\//g'` -SRCDIR=$2/ +DESTDIR=$1 +DATDIR=`echo $2 | sed 's/\/\//\//g'` +SRCDIR=$3/ +shift +shift +shift -echo Installing dat files in $DATDIR +case $0 in + *uninstall*) + if test ! -d "$DESTDIR/$DATDIR"; then + echo "Directory $DESTDIR/$DATDIR does not exist! " + echo "Do a "make installmsg" or "make install" first. " + exit 1 + fi + mode='uninstall' + ;; + *) mode='install' ;; +esac -for f in $SRCDIR/codepages/*.dat; do - FNAME=$DATDIR/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME +for f in $@; do + FNAME="$DESTDIR/$DATDIR/$f.dat" + if test "$mode" = 'install'; then + echo "Installing $f.dat as $FNAME " + cp "$SRCDIR/codepages/$f.dat" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 $FNAME + elif test "$mode" = 'uninstall'; then + echo "Removing $FNAME " + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + else + echo "Unknown mode, $mode. Script called as $0 " + exit 1 + fi done -cat << EOF +if test "$mode" = 'install'; then + cat << EOF ====================================================================== -The dat files have been installed. +The dat files have been installed. You may uninstall the dat files +using the command "make uninstalldat" or "make uninstall" to uninstall +binaries, man pages, dat files, and shell scripts. ====================================================================== EOF +else + cat << EOF +====================================================================== +The dat files have been removed. You may restore these files using +the command "make installdat" or "make install" to install binaries, +man pages, modules, dat files, and shell scripts. +====================================================================== +EOF +fi exit 0 diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh index 4ea8fde327..bfc1c359b5 100755 --- a/source3/script/installmodules.sh +++ b/source3/script/installmodules.sh @@ -1,7 +1,7 @@ #!/bin/sh INSTALLPERMS=$1 -DESTDIR=`echo $2 | sed 's/\/\//\//g'` +DESTDIR=$2 BASEDIR=`echo $3 | sed 's/\/\//\//g'` LIBDIR=`echo $4 | sed 's/\/\//\//g'` shift diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh index 5a41fe1ca8..3bfa3ee772 100644 --- a/source3/script/installmsg.sh +++ b/source3/script/installmsg.sh @@ -2,22 +2,64 @@ # first version (Sept 2003) written by Shiro Yamada # based on the first verion (March 2002) of installdat.sh written by Herb Lewis -MSGDIR=`echo $1 | sed 's/\/\//\//g'` -SRCDIR=$2/ +DESTDIR=$1 +MSGDIR=`echo $2 | sed 's/\/\//\//g'` +SRCDIR=$3/ +shift +shift +shift -echo Installing msg files in $MSGDIR +case $0 in + *uninstall*) + if test ! -d "$DESTDIR/$MSGDIR"; then + echo "Directory $DESTDIR/$MSGDIR does not exist! " + echo "Do a "make installmsg" or "make install" first. " + exit 1 + fi + mode='uninstall' + ;; + *) mode='install' ;; +esac -for f in $SRCDIR/po/*.msg; do - FNAME=$MSGDIR/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME +for f in $@; do + FNAME="$DESTDIR/$MSGDIR/$f.msg" + if test "$mode" = 'install'; then + echo "Installing $f.msg as $FNAME " + cp "$SRCDIR/po/$f.msg" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 $FNAME + elif test "$mode" = 'uninstall'; then + echo "Removing $FNAME " + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + else + echo "Unknown mode, $mode. Script called as $0 " + exit 1 + fi done -cat << EOF -====================================================================== -The msg files have been installed. +if test "$mode" = 'install'; then + cat << EOF +============================================================================== +The SWAT msg files have been installed. You may uninstall the msg files using +the command "make uninstallmsg" or "make uninstall" to uninstall binaries, man +pages, msg files, and shell scripts. +============================================================================== +EOF +else + cat << EOF +============================================================================= +The SWAT msg files have been removed. You may restore these files using the +command "make installmsg" or "make install" to install binaries, man pages, +modules, msg files, and shell scripts. ====================================================================== EOF +fi exit 0 diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index c5c285894e..095ccb897b 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -1,89 +1,152 @@ #!/bin/sh #first version March 1998, Andrew Tridgell -SWATDIR=`echo $1 | sed 's/\/\//\//g'` -SRCDIR=$2/ -BOOKDIR=$SWATDIR/using_samba +DESTDIR=$1 +SWATDIR=`echo $2 | sed 's/\/\//\//g'` +SRCDIR=$3/ +BOOKDIR="$DESTDIR/$SWATDIR/using_samba" -echo Installing SWAT in $SWATDIR -echo Installing the Samba Web Administration Tool +case $0 in + *uninstall*) + echo "Removing SWAT from $DESTDIR/$SWATDIR " + echo "Removing the Samba Web Administration Tool " + echo -n "Removed " + mode='uninstall' + ;; + *) + echo "Installing SWAT in $DESTDIR/$SWATDIR " + echo "Installing the Samba Web Administration Tool " + echo -n "Installing " + mode='install' + ;; +esac LANGS=". `cd $SRCDIR../swat/; /bin/echo lang/??`" -echo Installing langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` +echo "langs are `cd $SRCDIR../swat/lang/; /bin/echo ??` " -for ln in $LANGS; do - SWATLANGDIR=$SWATDIR/$ln - for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \ - $SWATLANGDIR/include $SWATLANGDIR/js; do +if test "$mode" = 'install'; then + for ln in $LANGS; do + SWATLANGDIR="$DESTDIR/$SWATDIR/$ln" + for d in $SWATLANGDIR $SWATLANGDIR/help $SWATLANGDIR/images \ + $SWATLANGDIR/include $SWATLANGDIR/js; do + if [ ! -d $d ]; then + mkdir -p $d if [ ! -d $d ]; then - mkdir -p $d - if [ ! -d $d ]; then - echo Failed to make directory $d, does $USER have privileges? - exit 1 - fi + echo "Failed to make directory $d, does $USER have privileges? " + exit 1 fi + fi + done done -done +fi -# Install images for ln in $LANGS; do + # images for f in $SRCDIR../swat/$ln/images/*.png; do - if [ ! -f $f ] ; then - continue + if [ ! -f $f ] ; then + continue + fi + FNAME="$DESTDIR/$SWATDIR/$ln/images/`basename $f`" + echo $FNAME + if test "$mode" = 'install'; then + cp "$f" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 fi - FNAME=$SWATDIR/$ln/images/`basename $f` - echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME + chmod 0644 "$FNAME" + elif test "$mode" = 'uninstall'; then + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + else + echo "Unknown mode, $mode. Script called as $0 " + exit 1 + fi done - # Install html help - + # html help for f in $SRCDIR../swat/$ln/help/*.html; do - if [ ! -f $f ] ; then - continue - fi - FNAME=$SWATDIR/$ln/help/`basename $f` - echo $FNAME + if [ ! -f $f ] ; then + continue + fi + FNAME="$DESTDIR/$SWATDIR/$ln/help/`basename $f`" + echo $FNAME + if test "$mode" = 'install'; then if [ "x$BOOKDIR" = "x" ]; then cat $f | sed 's/@BOOKDIR@.*$//' > $f.tmp else cat $f | sed 's/@BOOKDIR@//' > $f.tmp fi f=$f.tmp - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - rm -f $f - chmod 0644 $FNAME + cp "$f" "$FNAME" + rm -f "$f" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 "$FNAME" + elif test "$mode" = 'uninstall'; then + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + fi done - # Install "server-side" includes - + # "server-side" includes for f in $SRCDIR../swat/$ln/include/*; do if [ ! -f $f ] ; then continue fi - FNAME=$SWATDIR/$ln/include/`basename $f` + FNAME="$DESTDIR/$SWATDIR/$ln/include/`basename $f`" echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME + if test "$mode" = 'install'; then + cp "$f" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 $FNAME + elif test "$mode" = 'uninstall'; then + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + fi done - # Install javascripts - + # javascripts for f in $SRCDIR../swat/$ln/js/*.js; do if [ ! -f $f ] ; then continue fi - FNAME=$SWATDIR/$ln/js/`basename $f` + FNAME="$DESTDIR/$SWATDIR/$ln/js/`basename $f`" echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME + if test "$mode" = 'install'; then + cp "$f" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 $FNAME + elif test "$mode" = 'uninstall'; then + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + fi done done -# Install html documentation (if html documentation tree is here) +# Install/ remove html documentation (if html documentation tree is here) if [ -d $SRCDIR../docs/htmldocs/ ]; then @@ -94,47 +157,75 @@ if [ -d $SRCDIR../docs/htmldocs/ ]; then continue fi - INSTALLDIR=$SWATDIR/help/`echo $dir | sed 's/htmldocs\///g'` - if [ ! -d $INSTALLDIR ]; then - mkdir $INSTALLDIR + INSTALLDIR="$DESTDIR/$SWATDIR/help/`echo $dir | sed 's/htmldocs\///g'`" + if test ! -d "$INSTALLDIR" -a "$mode" = 'install'; then + mkdir "$INSTALLDIR" + if test ! -d "$INSTALLDIR"; then + echo "Failed to make directory $INSTALLDIR, does $USER have privileges? " + exit 1 + fi fi for f in $SRCDIR../docs/$dir/*.html; do FNAME=$INSTALLDIR/`basename $f` echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME + if test "$mode" = 'install'; then + cp "$f" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 $FNAME + elif test "$mode" = 'uninstall'; then + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + fi done - if [ -d $SRCDIR../docs/$dir/images/ ]; then - if [ ! -d $INSTALLDIR/images/ ]; then - mkdir $INSTALLDIR/images - if [ ! -d $INSTALLDIR/images/ ]; then - echo Failed to make directory $SWATDIR/help/images, does $USER have privileges? + if test -d "$SRCDIR../docs/$dir/images/"; then + if test ! -d "$INSTALLDIR/images/" -a "$mode" = 'install'; then + mkdir "$INSTALLDIR/images" + if test ! -d "$INSTALLDIR/images/"; then + echo "Failed to make directory $INSTALLDIR/images, does $USER have privileges? " exit 1 fi fi for f in $SRCDIR../docs/$dir/images/*.png; do FNAME=$INSTALLDIR/images/`basename $f` echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME + if test "$mode" = 'install'; then + cp "$f" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 $FNAME + elif test "$mode" = 'uninstall'; then + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + fi done fi done fi -# Install Using Samba book (but only if it is there) +# Install/ remove Using Samba book (but only if it is there) if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; then # Create directories for d in $BOOKDIR $BOOKDIR/figs ; do - if [ ! -d $d ]; then + if test ! -d "$d" -a "$mode" = 'install'; then mkdir $d - if [ ! -d $d ]; then - echo Failed to make directory $d, does $USER have privileges? + if test ! -d "$d"; then + echo "Failed to make directory $d, does $USER have privileges? " exit 1 fi fi @@ -145,15 +236,39 @@ if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; th for f in $SRCDIR../docs/htmldocs/using_samba/*.html; do FNAME=$BOOKDIR/`basename $f` echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME + if test "$mode" = 'install'; then + cp "$f" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 $FNAME + elif test "$mode" = 'uninstall'; then + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + fi done for f in $SRCDIR../docs/htmldocs/using_samba/*.gif; do FNAME=$BOOKDIR/`basename $f` echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME + if test "$mode" = 'install'; then + cp "$f" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 $FNAME + elif test "$mode" = 'uninstall'; then + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + fi done # Figures @@ -161,18 +276,40 @@ if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; th for f in $SRCDIR../docs/htmldocs/using_samba/figs/*.gif; do FNAME=$BOOKDIR/figs/`basename $f` echo $FNAME - cp $f $FNAME || echo Cannot install $FNAME. Does $USER have privileges? - chmod 0644 $FNAME + if test "$mode" = 'install'; then + cp "$f" "$FNAME" + if test ! -e "$FNAME"; then + echo "Cannot install $FNAME. Does $USER have privileges? " + exit 1 + fi + chmod 0644 $FNAME + elif test "$mode" = 'uninstall'; then + rm -f "$FNAME" + if test -e "$FNAME"; then + echo "Cannot remove $FNAME. Does $USER have privileges? " + exit 1 + fi + fi done fi -cat << EOF +if test "$mode" = 'install'; then + cat << EOF ====================================================================== The SWAT files have been installed. Remember to read the documentation for information on enabling and using SWAT ====================================================================== EOF +else + cat << EOF +====================================================================== +The SWAT files have been removed. You may restore these files using +the command "make installswat" or "make install" to install binaries, +man pages, modules, SWAT, and shell scripts. +====================================================================== +EOF +fi exit 0 diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh index 5de936fccf..597c5d95a5 100755 --- a/source3/script/uninstallbin.sh +++ b/source3/script/uninstallbin.sh @@ -2,31 +2,33 @@ #4 July 96 Dan.Shearer@UniSA.edu.au INSTALLPERMS=$1 -BASEDIR=`echo $2 | sed 's/\/\//\//g'` +DESTDIR=$2 BINDIR=`echo $3 | sed 's/\/\//\//g'` -LIBDIR=`echo $4 | sed 's/\/\//\//g'` -VARDIR=`echo $5 | sed 's/\/\//\//g'` -shift -shift shift shift shift -if [ ! -d $BINDIR ]; then - echo Directory $BINDIR does not exist! - echo Do a "make installbin" or "make install" first. +if [ ! -d $DESTDIR/$BINDIR ]; then + echo "Directory $DESTDIR/$BINDIR does not exist! " + echo "Do a "make installbin" or "make install" first. " exit 1 fi for p in $*; do p2=`basename $p` - if [ -f $BINDIR/$p2 ]; then - echo Removing $BINDIR/$p2 - rm -f $BINDIR/$p2 - if [ -f $BINDIR/$p2 ]; then - echo Cannot remove $BINDIR/$p2 ... does $USER have privileges? + if [ -f $DESTDIR/$BINDIR/$p2 ]; then + echo "Removing $DESTDIR/$BINDIR/$p2 " + rm -f $DESTDIR/$BINDIR/$p2 + if [ -f $DESTDIR/$BINDIR/$p2 ]; then + echo "Cannot remove $DESTDIR/$BINDIR/$p2 ... does $USER have privileges? " fi fi + + # this is a special case, mount needs this in a specific location + if test "$p2" = smbmount -a -e "$DESTDIR/sbin/mount.smbfs"; then + echo "Removing $DESTDIR/sbin/mount.smbfs " + rm -f "$DESTDIR/sbin/mount.smbfs" + fi done diff --git a/source3/script/uninstalldat.sh b/source3/script/uninstalldat.sh new file mode 120000 index 0000000000..656142745c --- /dev/null +++ b/source3/script/uninstalldat.sh @@ -0,0 +1 @@ +installdat.sh \ No newline at end of file diff --git a/source3/script/uninstallmodules.sh b/source3/script/uninstallmodules.sh index ac83af3dc9..194435bda3 100755 --- a/source3/script/uninstallmodules.sh +++ b/source3/script/uninstallmodules.sh @@ -2,25 +2,27 @@ #4 July 96 Dan.Shearer@UniSA.edu.au INSTALLPERMS=$1 -BASEDIR=`echo $2 | sed 's/\/\//\//g'` -LIBDIR=`echo $3 | sed 's/\/\//\//g'` +DESTDIR=$2 +BASEDIR=`echo $3 | sed 's/\/\//\//g'` +LIBDIR=`echo $4 | sed 's/\/\//\//g'` +shift shift shift shift -if [ ! -d $LIBDIR ]; then - echo Directory $LIBDIR does not exist! - echo Do a "make installmodules" or "make install" first. +if [ ! -d $DESTDIR/$LIBDIR ]; then + echo "Directory $DESTDIR/$LIBDIR does not exist! " + echo "Do a "make installmodules" or "make install" first. " exit 1 fi for p in $*; do p2=`basename $p` - if [ -f $LIBDIR/$p2 ]; then - echo Removing $LIBDIR/$p2 - rm -f $LIBDIR/$p2 - if [ -f $LIBDIR/$p2 ]; then - echo Cannot remove $LIBDIR/$p2 ... does $USER have privileges? + if [ -f $DESTDIR/$LIBDIR/$p2 ]; then + echo "Removing $DESTDIR/$LIBDIR/$p2 " + rm -f $DESTDIR/$LIBDIR/$p2 + if [ -f $DESTDIR/$LIBDIR/$p2 ]; then + echo "Cannot remove $DESTDIR/$LIBDIR/$p2 ... does $USER have privileges? " fi fi done diff --git a/source3/script/uninstallmsg.sh b/source3/script/uninstallmsg.sh new file mode 120000 index 0000000000..c108fa4416 --- /dev/null +++ b/source3/script/uninstallmsg.sh @@ -0,0 +1 @@ +installmsg.sh \ No newline at end of file diff --git a/source3/script/uninstallswat.sh b/source3/script/uninstallswat.sh new file mode 120000 index 0000000000..0dffe646f0 --- /dev/null +++ b/source3/script/uninstallswat.sh @@ -0,0 +1 @@ +installswat.sh \ No newline at end of file -- cgit From 21760b0001d5ab645c15a730c543ee870753e419 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Sat, 25 Feb 2006 17:58:52 +0000 Subject: r13688: Revert change to set DAT_FILES and SWAT_MSG_FILES in the Makefile. Instead check for *.dat and *.msg files as done before. Then added files are installed and removed as soon as we have some in the filesystem. It's simpler and less error prone. (This used to be commit 5119472cdcdc4a0e422d49290c3007527fefd6a2) --- source3/script/installdat.sh | 10 +++++----- source3/script/installmsg.sh | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh index 5d7958e273..298b29452b 100755 --- a/source3/script/installdat.sh +++ b/source3/script/installdat.sh @@ -20,16 +20,16 @@ case $0 in *) mode='install' ;; esac -for f in $@; do - FNAME="$DESTDIR/$DATDIR/$f.dat" +for f in $SRCDIR/codepages/*.dat; do + FNAME="$DESTDIR/$DATDIR/`basename $f`" if test "$mode" = 'install'; then - echo "Installing $f.dat as $FNAME " - cp "$SRCDIR/codepages/$f.dat" "$FNAME" + echo "Installing $f as $FNAME " + cp "$f" "$FNAME" if test ! -e "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi - chmod 0644 $FNAME + chmod 0644 "$FNAME" elif test "$mode" = 'uninstall'; then echo "Removing $FNAME " rm -f "$FNAME" diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh index 3bfa3ee772..612568bbce 100644 --- a/source3/script/installmsg.sh +++ b/source3/script/installmsg.sh @@ -21,16 +21,16 @@ case $0 in *) mode='install' ;; esac -for f in $@; do - FNAME="$DESTDIR/$MSGDIR/$f.msg" +for f in $SRCDIR/po/*.msg; do + FNAME="$DESTDIR/$MSGDIR/`basename $f`" if test "$mode" = 'install'; then - echo "Installing $f.msg as $FNAME " - cp "$SRCDIR/po/$f.msg" "$FNAME" + echo "Installing $f as $FNAME " + cp "$f" "$FNAME" if test ! -e "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi - chmod 0644 $FNAME + chmod 0644 "$FNAME" elif test "$mode" = 'uninstall'; then echo "Removing $FNAME " rm -f "$FNAME" -- cgit From bf565b7b7bfef0219db59bf5920abcc522f99aa5 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 3 Mar 2006 17:00:56 +0000 Subject: r13816: Volunteering :-) > for the svn log: > > - Solaris' /bin/sh doesn't know "test -e" - let's use "test -f" instead > > Some volunteer wanna check this in? :) > > Cheers > Bjoern Volker (This used to be commit 58d5f2031ac6018417ecd3c2306c120b5c7d1e43) --- source3/script/installdat.sh | 4 ++-- source3/script/installmsg.sh | 4 ++-- source3/script/installswat.sh | 36 ++++++++++++++++++------------------ source3/script/uninstallbin.sh | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installdat.sh b/source3/script/installdat.sh index 298b29452b..59bf2f919d 100755 --- a/source3/script/installdat.sh +++ b/source3/script/installdat.sh @@ -25,7 +25,7 @@ for f in $SRCDIR/codepages/*.dat; do if test "$mode" = 'install'; then echo "Installing $f as $FNAME " cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi @@ -33,7 +33,7 @@ for f in $SRCDIR/codepages/*.dat; do elif test "$mode" = 'uninstall'; then echo "Removing $FNAME " rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi diff --git a/source3/script/installmsg.sh b/source3/script/installmsg.sh index 612568bbce..859e4c10cf 100644 --- a/source3/script/installmsg.sh +++ b/source3/script/installmsg.sh @@ -26,7 +26,7 @@ for f in $SRCDIR/po/*.msg; do if test "$mode" = 'install'; then echo "Installing $f as $FNAME " cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi @@ -34,7 +34,7 @@ for f in $SRCDIR/po/*.msg; do elif test "$mode" = 'uninstall'; then echo "Removing $FNAME " rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi diff --git a/source3/script/installswat.sh b/source3/script/installswat.sh index 095ccb897b..427e177362 100755 --- a/source3/script/installswat.sh +++ b/source3/script/installswat.sh @@ -51,14 +51,14 @@ for ln in $LANGS; do echo $FNAME if test "$mode" = 'install'; then cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi chmod 0644 "$FNAME" elif test "$mode" = 'uninstall'; then rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi @@ -84,14 +84,14 @@ for ln in $LANGS; do f=$f.tmp cp "$f" "$FNAME" rm -f "$f" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi chmod 0644 "$FNAME" elif test "$mode" = 'uninstall'; then rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi @@ -107,14 +107,14 @@ for ln in $LANGS; do echo $FNAME if test "$mode" = 'install'; then cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi chmod 0644 $FNAME elif test "$mode" = 'uninstall'; then rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi @@ -130,14 +130,14 @@ for ln in $LANGS; do echo $FNAME if test "$mode" = 'install'; then cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi chmod 0644 $FNAME elif test "$mode" = 'uninstall'; then rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi @@ -171,14 +171,14 @@ if [ -d $SRCDIR../docs/htmldocs/ ]; then echo $FNAME if test "$mode" = 'install'; then cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi chmod 0644 $FNAME elif test "$mode" = 'uninstall'; then rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi @@ -198,14 +198,14 @@ if [ -d $SRCDIR../docs/htmldocs/ ]; then echo $FNAME if test "$mode" = 'install'; then cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi chmod 0644 $FNAME elif test "$mode" = 'uninstall'; then rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi @@ -238,14 +238,14 @@ if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; th echo $FNAME if test "$mode" = 'install'; then cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi chmod 0644 $FNAME elif test "$mode" = 'uninstall'; then rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi @@ -257,14 +257,14 @@ if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; th echo $FNAME if test "$mode" = 'install'; then cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi chmod 0644 $FNAME elif test "$mode" = 'uninstall'; then rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi @@ -278,14 +278,14 @@ if [ "x$BOOKDIR" != "x" -a -f $SRCDIR../docs/htmldocs/using_samba/toc.html ]; th echo $FNAME if test "$mode" = 'install'; then cp "$f" "$FNAME" - if test ! -e "$FNAME"; then + if test ! -f "$FNAME"; then echo "Cannot install $FNAME. Does $USER have privileges? " exit 1 fi chmod 0644 $FNAME elif test "$mode" = 'uninstall'; then rm -f "$FNAME" - if test -e "$FNAME"; then + if test -f "$FNAME"; then echo "Cannot remove $FNAME. Does $USER have privileges? " exit 1 fi diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh index 597c5d95a5..5d39b79882 100755 --- a/source3/script/uninstallbin.sh +++ b/source3/script/uninstallbin.sh @@ -25,7 +25,7 @@ for p in $*; do fi # this is a special case, mount needs this in a specific location - if test "$p2" = smbmount -a -e "$DESTDIR/sbin/mount.smbfs"; then + if test "$p2" = smbmount -a -f "$DESTDIR/sbin/mount.smbfs"; then echo "Removing $DESTDIR/sbin/mount.smbfs " rm -f "$DESTDIR/sbin/mount.smbfs" fi -- cgit From f27228fc317ec8ad717beee18a0a193650addde9 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Wed, 8 Mar 2006 21:20:43 +0000 Subject: r14052: Remove BASEDIR use in the Makefile. BASEDIR=prefix=@prefix@ till now. I suggest to stay with ^BASEDIR= @prefix@$ for at least the next release to give external projects - like samba-vscan project - time to adopt this change. BASEDIR is non of the default autoconf variables. prefix is. Jerry1: If possible please announce this with the next release. I'll self reply to technical. Jerry2: This does not break your makepkg stuff as you set BASEDIR _not_ from the Makefile. (This used to be commit 730d5ec22948c579a81137051134657043c34415) --- source3/script/installmodules.sh | 4 ++-- source3/script/uninstallmodules.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/script') diff --git a/source3/script/installmodules.sh b/source3/script/installmodules.sh index bfc1c359b5..f6e52880fe 100755 --- a/source3/script/installmodules.sh +++ b/source3/script/installmodules.sh @@ -2,14 +2,14 @@ INSTALLPERMS=$1 DESTDIR=$2 -BASEDIR=`echo $3 | sed 's/\/\//\//g'` +prefix=`echo $3 | sed 's/\/\//\//g'` LIBDIR=`echo $4 | sed 's/\/\//\//g'` shift shift shift shift -for d in $BASEDIR $LIBDIR; do +for d in $prefix $LIBDIR; do if [ ! -d $DESTDIR/$d ]; then mkdir $DESTDIR/$d if [ ! -d $DESTDIR/$d ]; then diff --git a/source3/script/uninstallmodules.sh b/source3/script/uninstallmodules.sh index 194435bda3..fc80565cb5 100755 --- a/source3/script/uninstallmodules.sh +++ b/source3/script/uninstallmodules.sh @@ -3,7 +3,7 @@ INSTALLPERMS=$1 DESTDIR=$2 -BASEDIR=`echo $3 | sed 's/\/\//\//g'` +prefix=`echo $3 | sed 's/\/\//\//g'` LIBDIR=`echo $4 | sed 's/\/\//\//g'` shift shift -- cgit From 24decd1233da03e4ce77e2110e7d06a368924164 Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Wed, 8 Mar 2006 21:42:12 +0000 Subject: r14056: Also install the mount.smbfs sym link to rootsbindir. Therfore we have to substitute rootsbindir in {,un}installbin.sh.in. Pass $prefix as third arg to installbin/ uninstallbin as rootsbindir by default is $prefix/sbin. (This used to be commit 7773b8c9e0ad7bcff1312f28ca9cd17d7677e9bd) --- source3/script/installbin.sh | 40 ---------------------------------- source3/script/installbin.sh.in | 42 +++++++++++++++++++++++++++++++++++ source3/script/uninstallbin.sh | 44 ------------------------------------- source3/script/uninstallbin.sh.in | 46 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 84 deletions(-) delete mode 100755 source3/script/installbin.sh create mode 100755 source3/script/installbin.sh.in delete mode 100755 source3/script/uninstallbin.sh create mode 100755 source3/script/uninstallbin.sh.in (limited to 'source3/script') diff --git a/source3/script/installbin.sh b/source3/script/installbin.sh deleted file mode 100755 index 8859c95341..0000000000 --- a/source3/script/installbin.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -INSTALLPERMS=$1 -DESTDIR=$2 -BINDIR=`echo $3 | sed 's/\/\//\//g'` -shift -shift -shift - -for p in $*; do - p2=`basename $p` - echo "Installing $p as $DESTDIR/$BINDIR/$p2 " - if [ -f $DESTDIR/$BINDIR/$p2 ]; then - rm -f $DESTDIR/$BINDIR/$p2.old - mv $DESTDIR/$BINDIR/$p2 $DESTDIR/$BINDIR/$p2.old - fi - cp $p $DESTDIR/$BINDIR/ - chmod $INSTALLPERMS $DESTDIR/$BINDIR/$p2 - - # this is a special case, mount needs this in a specific location - if [ $p2 = smbmount ]; then - if [ ! -d $DESTDIR/sbin ]; then - mkdir $DESTDIR/sbin - fi - echo "Creating sym link $DESTDIR/sbin/mount.smbfs to $BINDIR/$p2 " - ln -sf $BINDIR/$p2 $DESTDIR/sbin/mount.smbfs - fi -done - - -cat << EOF -====================================================================== -The binaries are installed. You may restore the old binaries (if there -were any) using the command "make revert". You may uninstall the binaries -using the command "make uninstallbin" or "make uninstall" to uninstall -binaries, man pages and shell scripts. -====================================================================== -EOF - -exit 0 diff --git a/source3/script/installbin.sh.in b/source3/script/installbin.sh.in new file mode 100755 index 0000000000..6c578b3971 --- /dev/null +++ b/source3/script/installbin.sh.in @@ -0,0 +1,42 @@ +#!/bin/sh + +INSTALLPERMS=$1 +DESTDIR=$2 +prefix=`echo $3 | sed 's/\/\//\//g'` +BINDIR=`echo $4 | sed 's/\/\//\//g'` +shift +shift +shift +shift + +for p in $*; do + p2=`basename $p` + echo "Installing $p as $DESTDIR/$BINDIR/$p2 " + if [ -f $DESTDIR/$BINDIR/$p2 ]; then + rm -f $DESTDIR/$BINDIR/$p2.old + mv $DESTDIR/$BINDIR/$p2 $DESTDIR/$BINDIR/$p2.old + fi + cp $p $DESTDIR/$BINDIR/ + chmod $INSTALLPERMS $DESTDIR/$BINDIR/$p2 + + # this is a special case, mount needs this in a specific location + if [ $p2 = smbmount ]; then + if [ ! -d $DESTDIR/@rootsbindir@ ]; then + mkdir $DESTDIR/@rootsbindir@ + fi + echo "Creating sym link $DESTDIR/@rootsbindir@/mount.smbfs to $BINDIR/$p2 " + ln -sf $BINDIR/$p2 $DESTDIR/@rootsbindir@/mount.smbfs + fi +done + + +cat << EOF +====================================================================== +The binaries are installed. You may restore the old binaries (if there +were any) using the command "make revert". You may uninstall the binaries +using the command "make uninstallbin" or "make uninstall" to uninstall +binaries, man pages and shell scripts. +====================================================================== +EOF + +exit 0 diff --git a/source3/script/uninstallbin.sh b/source3/script/uninstallbin.sh deleted file mode 100755 index 5d39b79882..0000000000 --- a/source3/script/uninstallbin.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh -#4 July 96 Dan.Shearer@UniSA.edu.au - -INSTALLPERMS=$1 -DESTDIR=$2 -BINDIR=`echo $3 | sed 's/\/\//\//g'` -shift -shift -shift - -if [ ! -d $DESTDIR/$BINDIR ]; then - echo "Directory $DESTDIR/$BINDIR does not exist! " - echo "Do a "make installbin" or "make install" first. " - exit 1 -fi - -for p in $*; do - p2=`basename $p` - if [ -f $DESTDIR/$BINDIR/$p2 ]; then - echo "Removing $DESTDIR/$BINDIR/$p2 " - rm -f $DESTDIR/$BINDIR/$p2 - if [ -f $DESTDIR/$BINDIR/$p2 ]; then - echo "Cannot remove $DESTDIR/$BINDIR/$p2 ... does $USER have privileges? " - fi - fi - - # this is a special case, mount needs this in a specific location - if test "$p2" = smbmount -a -f "$DESTDIR/sbin/mount.smbfs"; then - echo "Removing $DESTDIR/sbin/mount.smbfs " - rm -f "$DESTDIR/sbin/mount.smbfs" - fi -done - - -cat << EOF -====================================================================== -The binaries have been uninstalled. You may restore the binaries using -the command "make installbin" or "make install" to install binaries, -man pages, modules and shell scripts. You can restore a previous -version of the binaries (if there were any) using "make revert". -====================================================================== -EOF - -exit 0 diff --git a/source3/script/uninstallbin.sh.in b/source3/script/uninstallbin.sh.in new file mode 100755 index 0000000000..d8a4855823 --- /dev/null +++ b/source3/script/uninstallbin.sh.in @@ -0,0 +1,46 @@ +#!/bin/sh +#4 July 96 Dan.Shearer@UniSA.edu.au + +INSTALLPERMS=$1 +DESTDIR=$2 +prefix=`echo $3 | sed 's/\/\//\//g'` +BINDIR=`echo $4 | sed 's/\/\//\//g'` +shift +shift +shift +shift + +if [ ! -d $DESTDIR/$BINDIR ]; then + echo "Directory $DESTDIR/$BINDIR does not exist! " + echo "Do a "make installbin" or "make install" first. " + exit 1 +fi + +for p in $*; do + p2=`basename $p` + if [ -f $DESTDIR/$BINDIR/$p2 ]; then + echo "Removing $DESTDIR/$BINDIR/$p2 " + rm -f $DESTDIR/$BINDIR/$p2 + if [ -f $DESTDIR/$BINDIR/$p2 ]; then + echo "Cannot remove $DESTDIR/$BINDIR/$p2 ... does $USER have privileges? " + fi + fi + + # this is a special case, mount needs this in a specific location + if test "$p2" = smbmount -a -f "$DESTDIR/sbin/mount.smbfs"; then + echo "Removing $DESTDIR/sbin/mount.smbfs " + rm -f "$DESTDIR/@rootsbindir@/sbin/mount.smbfs" + fi +done + + +cat << EOF +====================================================================== +The binaries have been uninstalled. You may restore the binaries using +the command "make installbin" or "make install" to install binaries, +man pages, modules and shell scripts. You can restore a previous +version of the binaries (if there were any) using "make revert". +====================================================================== +EOF + +exit 0 -- cgit From 9b277916445e6c1bdc60e06c382067c209287aaf Mon Sep 17 00:00:00 2001 From: Lars Müller Date: Mon, 13 Mar 2006 16:10:26 +0000 Subject: r14325: Add pam_modules rule which builds the configure(d) pam modules. This is called as part of the all rule (again only if pam modules are requested by configure). Add pam_winbind rule. Ensure proto_exists before we build the pam modules. Add test_pam_modules rule to test if the built pam modules have any unresolved symbols. For test_pam_modules we use script/tests/dlopen.sh which was written by Nalin Dahyabhai . Thanks Nalin! RedHat and SuSE use this script to test nss and pam modules since several years. (This used to be commit 71b2eb55adcd28f3796254ea1ce0bcee6098e712) --- source3/script/tests/dlopen.sh | 91 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100755 source3/script/tests/dlopen.sh (limited to 'source3/script') diff --git a/source3/script/tests/dlopen.sh b/source3/script/tests/dlopen.sh new file mode 100755 index 0000000000..6127953692 --- /dev/null +++ b/source3/script/tests/dlopen.sh @@ -0,0 +1,91 @@ +#!/bin/sh +# +# Copyright (C) Nalin Dahyabhai 2003 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +tempdir=`mktemp -d /tmp/dlopenXXXXXX` +test -n "$tempdir" || exit 1 +cat >> $tempdir/dlopen.c << _EOF +#include +#include +#include +#include +/* Simple program to see if dlopen() would succeed. */ +int main(int argc, char **argv) +{ + int i; + struct stat st; + char buf[PATH_MAX]; + for (i = 1; i < argc; i++) { + if (dlopen(argv[i], RTLD_NOW)) { + fprintf(stdout, "dlopen() of \"%s\" succeeded.\n", + argv[i]); + } else { + snprintf(buf, sizeof(buf), "./%s", argv[i]); + if ((stat(buf, &st) == 0) && dlopen(buf, RTLD_NOW)) { + fprintf(stdout, "dlopen() of \"./%s\" " + "succeeded.\n", argv[i]); + } else { + fprintf(stdout, "dlopen() of \"%s\" failed: " + "%s\n", argv[i], dlerror()); + return 1; + } + } + } + return 0; +} +_EOF + +for arg in $@ ; do + case "$arg" in + "") + ;; + -I*|-D*|-f*|-m*|-g*|-O*|-W*) + cflags="$cflags $arg" + ;; + -l*|-L*) + ldflags="$ldflags $arg" + ;; + /*) + modules="$modules $arg" + ;; + *) + modules="$modules $arg" + ;; + esac +done + +${CC:-gcc} $RPM_OPT_FLAGS $CFLAGS -o $tempdir/dlopen $cflags $tempdir/dlopen.c $ldflags -ldl + +retval=0 +for module in $modules ; do + case "$module" in + "") + ;; + /*) + $tempdir/dlopen "$module" + retval=$? + ;; + *) + $tempdir/dlopen ./"$module" + retval=$? + ;; + esac +done + +rm -f $tempdir/dlopen $tempdir/dlopen.c +rmdir $tempdir +exit $retval -- cgit From b40e2588707d2b7c44ee91da91872e4f9dc5209b Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 21 Mar 2006 15:33:14 +0000 Subject: r14624: - add timelimit.c - add configure tests --with-selftest-prefix=/tmp/samba-test this is needed because the path name of unix socket can only be 108 chars long - add configure test --with-smbtorture4-path=/home/foo/prefix/samba4/bin/smbtorture this will be used to run samba4's smbtorture inside samba3's make test later metze (This used to be commit d9df1853b947c70f747ea30a353162f2985ef250) --- source3/script/tests/timelimit.c | 78 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 source3/script/tests/timelimit.c (limited to 'source3/script') diff --git a/source3/script/tests/timelimit.c b/source3/script/tests/timelimit.c new file mode 100644 index 0000000000..93d7f6497e --- /dev/null +++ b/source3/script/tests/timelimit.c @@ -0,0 +1,78 @@ +/* run a command with a limited timeout + tridge@samba.org, June 2005 + + attempt to be as portable as possible (fighting posix all the way) +*/ +#include +#include +#include +#include +#include +#include +#include +#include + +static void usage(void) +{ + printf("usage: timelimit