summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net/samba/Makefile3
-rw-r--r--net/samba/distinfo3
-rw-r--r--net/samba/patches/patch-ag54
3 files changed, 58 insertions, 2 deletions
diff --git a/net/samba/Makefile b/net/samba/Makefile
index 545827bc56a..d4ce9780071 100644
--- a/net/samba/Makefile
+++ b/net/samba/Makefile
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.133 2004/11/12 08:42:58 sketch Exp $
+# $NetBSD: Makefile,v 1.134 2004/11/13 21:48:11 kim Exp $
DISTNAME= samba-3.0.8
+PKGREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.samba.org/pub/samba/old-versions/ \
ftp://ring.asahi-net.or.jp/pub/net/samba/old-versions/ \
diff --git a/net/samba/distinfo b/net/samba/distinfo
index a7eea8cb2a8..c75b2ffad90 100644
--- a/net/samba/distinfo
+++ b/net/samba/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.37 2004/11/09 08:21:27 grant Exp $
+$NetBSD: distinfo,v 1.38 2004/11/13 21:48:11 kim Exp $
SHA1 (samba-3.0.8.tar.gz) = 63b6264a3cd3117c8b820e0bf8c8b2c59c8cb820
Size (samba-3.0.8.tar.gz) = 15101353 bytes
@@ -7,3 +7,4 @@ SHA1 (patch-ac) = fc0d15f371a9c3544499f6a6cd830b52b34ff644
SHA1 (patch-ad) = b75770eb6fc7ff5d26764fced83e26fd6cf153af
SHA1 (patch-ae) = cf3a040f04142df534abe54b66156a48697b665d
SHA1 (patch-af) = bc0cead8f8350001e5291443821e875bab540fc3
+SHA1 (patch-ag) = cce908577cf4007bb00b15f6dd7eee7d549ac5b0
diff --git a/net/samba/patches/patch-ag b/net/samba/patches/patch-ag
new file mode 100644
index 00000000000..87f45a5961b
--- /dev/null
+++ b/net/samba/patches/patch-ag
@@ -0,0 +1,54 @@
+$NetBSD: patch-ag,v 1.4 2004/11/13 21:48:11 kim Exp $
+
+--- passdb/passdb.c.orig 2004-08-19 09:39:13.000000000 -0400
++++ passdb/passdb.c 2004-10-28 00:22:15.000000000 -0400
+@@ -246,6 +246,11 @@
+ NTSTATUS pdb_fill_sam_pw(SAM_ACCOUNT *sam_account, const struct passwd *pwd)
+ {
+ NTSTATUS ret;
++#ifdef BSD
++# define BUFLEN 1024
++ char *bp, *gecos, *p, buf[BUFLEN];
++ int buflen;
++#endif
+
+ if (!pwd) {
+ return NT_STATUS_UNSUCCESSFUL;
+@@ -254,7 +259,37 @@
+ pdb_fill_default_sam(sam_account);
+
+ pdb_set_username(sam_account, pwd->pw_name, PDB_SET);
++
++#ifdef BSD
++ gecos = pwd->pw_gecos;
++ if (*gecos == '*')
++ gecos++;
++ bp = buf;
++
++ /* copy gecos, interpolating & to be full name */
++ for (p = gecos; *p != '\0'; p++) {
++ if (bp >= &buf[BUFLEN - 1]) {
++ /* buffer overflow */
++ gecos = pwd->pw_name;
++ goto gecos_done;
++ }
++ if (*p == '&') {
++ /* interpolate full name */
++ snprintf(bp, BUFLEN - (bp - buf), "%s", pwd->pw_name);
++ *bp = toupper(*bp);
++ bp += strlen(bp);
++ }
++ else
++ *bp++ = *p;
++ }
++ *bp = '\0';
++ gecos = buf;
++
++ gecos_done:
++ pdb_set_fullname(sam_account, gecos, PDB_SET);
++#else
+ pdb_set_fullname(sam_account, pwd->pw_gecos, PDB_SET);
++#endif
+
+ pdb_set_unix_homedir(sam_account, pwd->pw_dir, PDB_SET);
+