summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorchristos <christos@pkgsrc.org>1998-09-03 16:37:03 +0000
committerchristos <christos@pkgsrc.org>1998-09-03 16:37:03 +0000
commit0c675c537694f60e6e201cbb24126666357a36cf (patch)
tree3020b10400c844802d39a77fc02319edafef5025 /net
parent7539fd86072c40a13831c7e16023d0b554f6f5e0 (diff)
downloadpkgsrc-0c675c537694f60e6e201cbb24126666357a36cf.tar.gz
make a copy of pw->pw_name because it can be overwritten by other calls to
getpw*.
Diffstat (limited to 'net')
-rw-r--r--net/icb/patches/patch-ae23
1 files changed, 23 insertions, 0 deletions
diff --git a/net/icb/patches/patch-ae b/net/icb/patches/patch-ae
new file mode 100644
index 00000000000..eda6d71990f
--- /dev/null
+++ b/net/icb/patches/patch-ae
@@ -0,0 +1,23 @@
+*** icb/unix.c.orig Fri Feb 24 16:20:31 1995
+--- icb/unix.c Thu Sep 3 10:28:33 1998
+***************
+*** 49,56 ****
+ if (((loginid = getlogin()) == NULL) || *loginid == '\0')
+ if ((pw = getpwuid(getuid())) == NULL)
+ loginid = NULL;
+! else
+! loginid = pw->pw_name;
+ return(loginid);
+ }
+
+--- 49,58 ----
+ if (((loginid = getlogin()) == NULL) || *loginid == '\0')
+ if ((pw = getpwuid(getuid())) == NULL)
+ loginid = NULL;
+! else {
+! loginid = malloc(strlen(pw->pw_name) + 1);
+! strcpy(loginid, pw->pw_name);
+! }
+ return(loginid);
+ }
+