From 0c675c537694f60e6e201cbb24126666357a36cf Mon Sep 17 00:00:00 2001 From: christos Date: Thu, 3 Sep 1998 16:37:03 +0000 Subject: make a copy of pw->pw_name because it can be overwritten by other calls to getpw*. --- net/icb/patches/patch-ae | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 net/icb/patches/patch-ae (limited to 'net') 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); + } + -- cgit v1.2.3