- More reformatting merged from OpenBSD CVS
- Merged OpenBSD CVS changes:
- [channels.c]
report from mrwizard@psu.edu via djm@ibs.com.au
- [channels.c]
set SO_REUSEADDR and SO_LINGER for forwarded ports.
chip@valinux.com via damien@ibs.com.au
- [nchan.c]
it's not an error() if shutdown_write failes in nchan.
- [readconf.c]
remove dead #ifdef-0-code
- [readconf.c servconf.c]
strcasecmp instead of tolower
- [scp.c]
progress meter overflow fix from damien@ibs.com.au
- [ssh-add.1 ssh-add.c]
SSH_ASKPASS support
- [ssh.1 ssh.c]
postpone fork_after_authentication until command execution,
request/patch from jahakala@cc.jyu.fi via damien@ibs.com.au
plus: use daemon() for backgrounding
diff --git a/login.c b/login.c
index aa01aac..ddd58ff 100644
--- a/login.c
+++ b/login.c
@@ -18,7 +18,7 @@
*/
#include "includes.h"
-RCSID("$Id: login.c,v 1.3 1999/11/24 13:26:22 damien Exp $");
+RCSID("$Id: login.c,v 1.4 1999/11/25 00:54:59 damien Exp $");
#include <utmp.h>
#include "ssh.h"
@@ -30,12 +30,16 @@
# include <lastlog.h>
#endif
-/* Returns the time when the user last logged in. Returns 0 if the
- information is not available. This must be called before record_login.
- The host the user logged in from will be returned in buf. */
+/*
+ * Returns the time when the user last logged in. Returns 0 if the
+ * information is not available. This must be called before record_login.
+ * The host the user logged in from will be returned in buf.
+ */
-/* Returns the time when the user last logged in (or 0 if no previous login
- is found). The name of the host used last time is returned in buf. */
+/*
+ * Returns the time when the user last logged in (or 0 if no previous login
+ * is found). The name of the host used last time is returned in buf.
+ */
unsigned long
get_last_login_time(uid_t uid, const char *logname,
@@ -64,8 +68,10 @@
return ll.ll_time;
}
-/* Records that the user has logged in. I these parts of operating systems
- were more standardized. */
+/*
+ * Records that the user has logged in. I these parts of operating systems
+ * were more standardized.
+ */
void
record_login(int pid, const char *ttyname, const char *user, uid_t uid,
@@ -95,9 +101,10 @@
/* Update lastlog unless actually recording a logout. */
if (strcmp(user, "") != 0) {
- /* It is safer to bzero the lastlog structure first
- because some systems might have some extra fields in it
- (e.g. SGI) */
+ /*
+ * It is safer to bzero the lastlog structure first because
+ * some systems might have some extra fields in it (e.g. SGI)
+ */
memset(&ll, 0, sizeof(ll));
/* Update lastlog. */