summaryrefslogtreecommitdiffstats
path: root/login.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-25 11:54:57 +1100
committerDamien Miller <djm@mindrot.org>1999-11-25 11:54:57 +1100
commit5428f646ad32da88ddd04a8c287d595524674fbf (patch)
treecc1f1e5d7852e1f44d41077f776abf7dab7ac06d /login.c
parent9072e1889648988da38b7b81bce95291c1dc3a23 (diff)
- 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
Diffstat (limited to 'login.c')
-rw-r--r--login.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/login.c b/login.c
index aa01aac4..ddd58ff6 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 @@ RCSID("$Id: login.c,v 1.3 1999/11/24 13:26:22 damien Exp $");
# 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 @@ get_last_login_time(uid_t uid, const char *logname,
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 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
/* 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. */