diff options
author | taca <taca@pkgsrc.org> | 2004-06-05 13:16:35 +0000 |
---|---|---|
committer | taca <taca@pkgsrc.org> | 2004-06-05 13:16:35 +0000 |
commit | ba113b5e32351ea50ea9f059dc98cd518ff9b5c1 (patch) | |
tree | 1c12650a7f87d1226299d4959977516b3a70d9c5 /net/ja-samba/files | |
parent | f9e408da7bac97c9914a34a1f8d6cfe49b1c8df9 (diff) | |
download | pkgsrc-ba113b5e32351ea50ea9f059dc98cd518ff9b5c1.tar.gz |
Update ja-samba package to 2.2.9.1.0 (samba-2.2.9-ja-1.0).
- Introduce adduser/deluser script from samba2 package.
- Here is changes:
Changelog of Samba2.2 Japanese Edition
Samba Users Group Japan
Here is the fix list of Samba2.2 Japanese Edition.
The sign of each line means:
*: Fix of Samba Japanese Edition only
x: Fix of sending a patch to Samba Team
c: Fix of being commited a patch by Samba Team
o: Fix of adopting a patch created by Samba team
samba-2.2.8a-ja-1.2alpha3
~~~~~~~~~~~~~~~~~~~~~~~~~
o Fixed oplocks problem for Linux kernel 2.4 or later
[sugj-tech:6096]
samba-2.2.8a-ja-1.2alpha2
~~~~~~~~~~~~~~~~~~~~~~~~~
Changes to the internationalized version
* Support Kerberos V not only for FreeBSD [sugj-tech:6030]
* Adjust some directory specifications for RPM [sugj-tech:6029]
* Fixed unavailable winbind auth problem on FreeBSD [sugj-tech:6049]
* Fixed smbwrapper.64.so problem for 64bit Solaris [sugj-tech:6048]
Changes to the original version
* Suppressed abortion in some commands when resolve order is specified
[sugj-tech:6031]
* Fixed unchangeable password problem when Samba is PDC for BSDish OS
[sugj-tech:6073]
samba-2.2.8a-ja-1.2alpha1
~~~~~~~~~~~~~~~~~~~~~~~~~
Changes to the internationalized version
* Fixed unavailable Japanese problem for username in username map
[samba-jp:15437]
Changes to the original version
* Fixed build problem with Mac OS X [samba-jp:15461]
* Fixed unaccessable problem in BSD/OS, Mac OS X [samba-jp:15472]
Diffstat (limited to 'net/ja-samba/files')
-rw-r--r-- | net/ja-samba/files/adduser.sh | 160 | ||||
-rw-r--r-- | net/ja-samba/files/deluser.sh | 68 |
2 files changed, 228 insertions, 0 deletions
diff --git a/net/ja-samba/files/adduser.sh b/net/ja-samba/files/adduser.sh new file mode 100644 index 00000000000..61706e23a96 --- /dev/null +++ b/net/ja-samba/files/adduser.sh @@ -0,0 +1,160 @@ +#!/bin/sh +# +# $NetBSD: adduser.sh,v 1.1 2004/06/05 13:16:35 taca Exp $ +# +# This is an adduser script for NetBSD systems whose useradd(8) doesn't +# accept "$" in the username. + +awkprog="@AWK@" +catprog="@CAT@" +mktempprog="@MKTEMP@" +pwdmkdbprog="@PWD_MKDB@" +rmprog="@RM@" + +progname=adduser + +usage() { + echo "Usage: $progname [-c comment] [-d homedir] [-n] [-r low..high]" + echo " [-s shell] -g gid name" + exit 1 +} + +isnum() { + case "$1" in + 0[0-9]*|*[!0-9]*) + return 1 + ;; + esac + return 0 +} + +doit="" +gid="" +minuid=1000 +maxuid=60000 +comment="" +homedir="" +shell=/sbin/nologin + +while getopts c:d:g:nr:s: flag; do + case $flag in + c) comment="${OPTARG}" ;; + d) homedir="${OPTARG}" ;; + g) gid="${OPTARG}" ;; + n) doit=":" ;; + r) minuid=${OPTARG%%..*}; maxuid=${OPTARG##*..} ;; + s) shell="${OPTARG}" ;; + esac +done +shift `expr $OPTIND - 1` + +if [ $# -lt 1 ]; then + usage +fi + +name="$1" +if [ -z "$gid" ]; then + echo "$progname: \`-g gid' is a required option" 1>&2 + exit 1 +fi +if ! isnum "$gid"; then + echo "$progname: \`$gid' is not a valid gid" 1>&2 + exit 1 +fi +if ! isnum "$minuid"; then + echo "$progname: \`$minuid' is not a valid minimum uid" 1>&2 + exit 1 +fi +if ! isnum "$maxuid"; then + echo "$progname: \`$maxuid' is not a valid maximum uid" 1>&2 + exit 1 +fi +if [ $minuid -gt $maxuid ]; then + echo "$progname: \`$minuid..$maxuid' is not a valid range" 1>&2 + exit 1 +fi +case "$comment" in +*:*) + echo "$progname: \`$comment' is not a valid comment" 1>&2 + exit 1 + ;; +esac +case "$homedir" in +*:*) + echo "$progname: \`$homedir' is not a valid home directory" 1>&2 + exit 1 + ;; +%*) + # This is an unsubstituted variable (probably %H in smbd). + # Silently change this to a proper default. + # + homedir="/nonexistent" + ;; +esac +case "$shell" in +*:*) + echo "$progname: \`$shell' is not a valid shell" 1>&2 + exit 1 + ;; +esac +case "$name" in +*:*) + echo "$progname: \`$name' is not a valid username" 1>&2 + exit 1 + ;; +esac + +ptmp=`$mktempprog -q /etc/ptmp` +case "$ptmp" in +/etc/ptmp) + ;; +*) + echo "$progname: can't create /etc/ptmp" 1>&2 + exit 1 + ;; +esac + +if [ ! -f /etc/master.passwd ]; then + echo "$progname: /etc/master.passwd not found" 1>&2 + $rmprog -f $ptmp + exit 1 +fi + +$catprog /etc/master.passwd >> $ptmp + +uid=` \ + $awkprog -v minuid=$minuid -v maxuid=maxuid ' \ + BEGIN { FS = ":" } \ + { seen_uids[$3] = 1 } \ + END { \ + uid = minuid; \ + while (uid <= maxuid) { \ + if (uid in seen_uids) { \ + uid++; \ + continue; \ + } \ + print uid; \ + exit; \ + } \ + print -1; \ + }' $ptmp \ +` +if [ $uid -lt 0 ]; then + echo "$progname: no uid can be allocated in $minuid..$maxuid" 1>&2 + $rmprog -f $ptmp + exit 1 +fi + +case "${name}" in +*$) : ${comment:=${name%%[$]*} samba machine account} ;; +*) : ${comment:=${name} samba user} ;; +esac +entry="${name}:*:${uid}:${gid}::0:0:${comment}:${homedir}:${shell}" + +echo "$entry" >> $ptmp + +$doit $pwdmkdbprog -p -u "${name}" $ptmp +rc=$? + +$rmprog -f $ptmp +exit $rc diff --git a/net/ja-samba/files/deluser.sh b/net/ja-samba/files/deluser.sh new file mode 100644 index 00000000000..c4c6660b4ca --- /dev/null +++ b/net/ja-samba/files/deluser.sh @@ -0,0 +1,68 @@ +#!/bin/sh +# +# $NetBSD: deluser.sh,v 1.1 2004/06/05 13:16:35 taca Exp $ +# +# This is a deluser script for NetBSD systems whose userdel(8) doesn't +# accept "$" in the username. + +awkprog="@AWK@" +mktempprog="@MKTEMP@" +pwdmkdbprog="@PWD_MKDB@" +rmprog="@RM@" + +progname=deluser + +usage() { + echo "Usage: $progname [-n] name" + exit 1 +} + +doit="" + +while getopts n flag; do + case $flag in + n) doit=":" ;; + esac +done +shift `expr $OPTIND - 1` + +if [ $# -lt 1 ]; then + usage +fi + +name="$1" + +case "$name" in +*:*) + echo "$progname: \`$name' is not a valid user name" 1>&2 + exit 1 +esac + +ptmp=`$mktempprog -q /etc/ptmp` +case "$ptmp" in +/etc/ptmp) + ;; +*) + echo "$progname: can't create /etc/ptmp" 1>&2 + exit 1 + ;; +esac + +if [ ! -f /etc/master.passwd ]; then + echo "$progname: /etc/master.passwd not found" 1>&2 + $rmprog -f $ptmp + exit 1 +fi + +$awkprog -v name="${name}" ' \ + BEGIN { FS = ":" } \ + { \ + if ($1 != name) \ + print $0; \ + }' /etc/master.passwd > $ptmp + +$doit $pwdmkdbprog -p $ptmp +rc=$? + +$rmprog -f $ptmp +exit $rc |