diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2009-08-26 10:00:38 -0500 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:41:17 +0200 |
commit | 5a12e7c134274dba706667107d10d231517d3e05 (patch) | |
tree | 55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/n/biff+comsat/biff+comsat.badutmp.diff | |
download | current-5a12e7c134274dba706667107d10d231517d3e05.tar.gz |
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009
Slackware 13.0 x86_64 is released as stable! Thanks to everyone who
helped make this release possible -- see the RELEASE_NOTES for the
credits. The ISOs are off to the replicator. This time it will be a
6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We're taking pre-orders now at store.slackware.com. Please consider
picking up a copy to help support the project. Once again, thanks to
the entire Slackware community for all the help testing and fixing
things and offering suggestions during this development cycle.
As always, have fun and enjoy! -P.
Diffstat (limited to 'source/n/biff+comsat/biff+comsat.badutmp.diff')
-rw-r--r-- | source/n/biff+comsat/biff+comsat.badutmp.diff | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/source/n/biff+comsat/biff+comsat.badutmp.diff b/source/n/biff+comsat/biff+comsat.badutmp.diff new file mode 100644 index 00000000..2cb79b59 --- /dev/null +++ b/source/n/biff+comsat/biff+comsat.badutmp.diff @@ -0,0 +1,43 @@ +--- ./comsat/comsat.c.orig 2004-06-21 13:50:09.000000000 -0700 ++++ ./comsat/comsat.c 2004-06-21 13:50:52.000000000 -0700 +@@ -69,6 +69,8 @@ + static int debug = 0; + #define dsyslog if (debug) syslog + ++ ++ + #define MAXIDLE 120 + + static char hostname[MAXHOSTNAMELEN]; +@@ -331,6 +333,7 @@ + char line[sizeof(utp->ut_line) + 1]; /* tty name */ + const char *cr; /* line delimiter */ + sigset_t sigset; /* scratch signal mask */ ++ struct passwd *pwbuf; /* passwd information buffer */ + + #ifdef USER_PROCESS + if (utp->ut_type != USER_PROCESS) { +@@ -371,6 +374,23 @@ + dsyslog(LOG_DEBUG, "%s: wrong mode on %s", name, tty); + return; + } ++ /* ++ * Ensure the tty is owned by the uid of 'name' to prevent old ++ * unremoved utmp records referring to user 'x' leading to ++ * biffage of user 'x''s email to user 'y' where user 'y' is ++ * logged onto the same terminal that user 'x' previously ++ * used. T.Crane, 8th June 2004. ++ */ ++ if ((pwbuf=getpwnam(name))==NULL) { ++ syslog(LOG_ERR, "get pwname(%s) failed", name); ++ exit(1); ++ } ++ if (pwbuf->pw_uid != stb.st_uid) { ++ dsyslog(LOG_DEBUG, "Warning: tty uid %d != uid %d for %s on %s\n", ++ stb.st_uid, pwbuf->pw_uid, name, tty); ++ return; ++ } ++ + dsyslog(LOG_DEBUG, "notify %s on %s\n", name, tty); + + /* |