summaryrefslogtreecommitdiff
path: root/net/samba/patches/patch-aq
diff options
context:
space:
mode:
Diffstat (limited to 'net/samba/patches/patch-aq')
-rw-r--r--net/samba/patches/patch-aq56
1 files changed, 0 insertions, 56 deletions
diff --git a/net/samba/patches/patch-aq b/net/samba/patches/patch-aq
deleted file mode 100644
index 2ad37976946..00000000000
--- a/net/samba/patches/patch-aq
+++ /dev/null
@@ -1,56 +0,0 @@
-$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);