diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/samba/distinfo | 4 | ||||
-rw-r--r-- | net/samba/patches/patch-ap | 57 | ||||
-rw-r--r-- | net/samba/patches/patch-aq | 56 |
3 files changed, 116 insertions, 1 deletions
diff --git a/net/samba/distinfo b/net/samba/distinfo index cf832a114e9..95cf8d4094e 100644 --- a/net/samba/distinfo +++ b/net/samba/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.21 2002/08/25 21:50:11 jlam Exp $ +$NetBSD: distinfo,v 1.22 2002/10/14 01:51:26 kim Exp $ SHA1 (samba-2.2.5.tar.bz2) = 67e1025a8d01ba51b8cea6f04176fdbc57b7c012 Size (samba-2.2.5.tar.bz2) = 4343641 bytes @@ -10,3 +10,5 @@ SHA1 (patch-ag) = 256a7e1edb961985398a94c0b738fd96fe781f9c SHA1 (patch-ah) = e87f2e393db68acc7028fe20d4772455379ad7aa SHA1 (patch-aj) = e2c5f7580a8c701b6bf35d0d3004f714f2c810cb SHA1 (patch-al) = 368c7f88c5538fcaa32d7263ba98d138ba179859 +SHA1 (patch-ap) = cc0b3d73d0c7de4cd46e66b0d66b2c3bbaddeb41 +SHA1 (patch-aq) = ea9cd9097cf91dd2b9f1acd9e6ff6f9445505774 diff --git a/net/samba/patches/patch-ap b/net/samba/patches/patch-ap new file mode 100644 index 00000000000..071d0eb731c --- /dev/null +++ b/net/samba/patches/patch-ap @@ -0,0 +1,57 @@ +$NetBSD: patch-ap,v 1.1 2002/10/14 01:51:27 kim Exp $ + +Expand & in the gecos field to a capitalized login name. + +--- lib/util_getent.c.orig Sat Feb 2 19:46:42 2002 ++++ lib/util_getent.c Sun Oct 13 21:37:56 2002 +@@ -155,6 +155,11 @@ + struct sys_pwent *plist; + struct sys_pwent *pent; + struct passwd *pwd; ++#ifdef BSD ++# define BUFLEN 1024 ++ char *bp, *gecos, *p, buf[BUFLEN]; ++ int buflen; ++#endif + + pent = (struct sys_pwent *) malloc(sizeof(struct sys_pwent)); + if (pent == NULL) { +@@ -178,9 +183,38 @@ + pent->pw_uid = pwd->pw_uid; + pent->pw_gid = pwd->pw_gid; + if (pwd->pw_gecos) { ++#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 */ ++ 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'; ++ if ((pent->pw_name = strdup(buf)) == NULL) ++ goto err; ++#else + if ((pent->pw_name = strdup(pwd->pw_gecos)) == NULL) + goto err; ++#endif + } ++#ifdef BSD ++ gecos_done: ++#endif + if (pwd->pw_dir) { + if ((pent->pw_name = strdup(pwd->pw_dir)) == NULL) + goto err; diff --git a/net/samba/patches/patch-aq b/net/samba/patches/patch-aq new file mode 100644 index 00000000000..2ad37976946 --- /dev/null +++ b/net/samba/patches/patch-aq @@ -0,0 +1,56 @@ +$NetBSD: patch-aq,v 1.1 2002/10/14 01:51:27 kim Exp $ + +Expand & in the gecos field to a capitalized login name. + +--- lib/system.c.orig Thu May 2 21:03:10 2002 ++++ lib/system.c Sun Oct 13 21:36:59 2002 +@@ -773,6 +773,12 @@ + + static void copy_pwent(struct saved_pw *dst, struct passwd *pass) + { ++#ifdef BSD ++# define BUFLEN 1024 ++ char *bp, *gecos, *p, buf[BUFLEN]; ++ int buflen; ++#endif ++ + memcpy((char *)&dst->pass, pass, sizeof(struct passwd)); + + fstrcpy(dst->pw_name, pass->pw_name); +@@ -781,7 +787,36 @@ + fstrcpy(dst->pw_passwd, pass->pw_passwd); + dst->pass.pw_passwd = dst->pw_passwd; + ++#ifdef BSD ++ gecos = pass->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 = pass->pw_name; ++ goto gecos_done; ++ } ++ if (*p == '&') { ++ /* interpolate full name */ ++ snprintf(bp, BUFLEN - (bp - buf), "%s", pass->pw_name); ++ *bp = toupper(*bp); ++ bp += strlen(bp); ++ } ++ else ++ *bp++ = *p; ++ } ++ *bp = '\0'; ++ gecos = buf; ++ ++ gecos_done: ++ fstrcpy(dst->pw_gecos, gecos); ++#else + fstrcpy(dst->pw_gecos, pass->pw_gecos); ++#endif + dst->pass.pw_gecos = dst->pw_gecos; + + pstrcpy(dst->pw_dir, pass->pw_dir); |