diff options
author | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2017-12-01 11:19:21 +0000 |
---|---|---|
committer | Dmitry Marakasov <amdmi3@FreeBSD.org> | 2017-12-01 11:19:21 +0000 |
commit | 518b70dd4108df79584e81f65dd54ebd999e920b (patch) | |
tree | 47f8a6891dfcacb0c6c56ba97ef03bbd99e10cd6 /security/slush/files/patch-slushd.c | |
parent | - Add LICENSE (diff) |
- Switch to options helpers
- Regenerate patches
Notes
Notes:
svn path=/head/; revision=455271
Diffstat (limited to 'security/slush/files/patch-slushd.c')
-rw-r--r-- | security/slush/files/patch-slushd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/security/slush/files/patch-slushd.c b/security/slush/files/patch-slushd.c index c1f97deabe00..b81fc7a81e2d 100644 --- a/security/slush/files/patch-slushd.c +++ b/security/slush/files/patch-slushd.c @@ -1,4 +1,4 @@ ---- slushd.c +--- slushd.c.orig 1999-05-07 02:24:09 UTC +++ slushd.c @@ -40,11 +40,19 @@ #include <ctype.h> @@ -20,7 +20,7 @@ #include <limits.h> #include <paths.h> #include <sys/types.h> -@@ -653,59 +661,42 @@ +@@ -653,59 +661,42 @@ int process_control_word(const char *tok /* exits on error */ void log_uwtmp(struct passwd *pw, struct in_addr *i, char *tty, int is_logout) { @@ -56,15 +56,14 @@ - ut.ut_time = time(NULL); - ut.ut_type = is_logout?DEAD_PROCESS:USER_PROCESS; - ut.ut_pid = getpid(); -- ++ memset(&ut, 0, sizeof ut); ++ gettimeofday(&ut.ut_tv, NULL); ++ strncpy(ut.ut_id, tty, sizeof ut.ut_id); + - strncpy(ut.ut_host, hostname, sizeof(ut.ut_host) - 1); - ut.ut_host[sizeof(ut.ut_host) - 1] = 0; - - memcpy(&ut.ut_addr, i, sizeof(ut.ut_addr)); -+ memset(&ut, 0, sizeof ut); -+ gettimeofday(&ut.ut_tv, NULL); -+ strncpy(ut.ut_id, tty, sizeof ut.ut_id); -+ + if (is_logout) { + ut.ut_type = DEAD_PROCESS; + } else { |