summaryrefslogtreecommitdiff
path: root/login.c
diff options
context:
space:
mode:
Diffstat (limited to 'login.c')
-rw-r--r--login.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/login.c b/login.c
index da11b245f..b4a8bafca 100644
--- a/login.c
+++ b/login.c
@@ -1,24 +1,24 @@
1/* 1/*
2 * 2 *
3 * login.c 3 * login.c
4 * 4 *
5 * Author: Tatu Ylonen <ylo@cs.hut.fi> 5 * Author: Tatu Ylonen <ylo@cs.hut.fi>
6 * 6 *
7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 7 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
8 * All rights reserved 8 * All rights reserved
9 * 9 *
10 * Created: Fri Mar 24 14:51:08 1995 ylo 10 * Created: Fri Mar 24 14:51:08 1995 ylo
11 * 11 *
12 * This file performs some of the things login(1) normally does. We cannot 12 * This file performs some of the things login(1) normally does. We cannot
13 * easily use something like login -p -h host -f user, because there are 13 * easily use something like login -p -h host -f user, because there are
14 * several different logins around, and it is hard to determined what kind of 14 * several different logins around, and it is hard to determined what kind of
15 * login the current system has. Also, we want to be able to execute commands 15 * login the current system has. Also, we want to be able to execute commands
16 * on a tty. 16 * on a tty.
17 * 17 *
18 */ 18 */
19 19
20#include "includes.h" 20#include "includes.h"
21RCSID("$Id: login.c,v 1.22 2000/02/02 08:17:41 damien Exp $"); 21RCSID("$Id: login.c,v 1.23 2000/04/16 01:18:43 damien Exp $");
22 22
23#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX) 23#if defined(HAVE_UTMPX_H) && defined(USE_UTMPX)
24# include <utmpx.h> 24# include <utmpx.h>
@@ -49,7 +49,7 @@ RCSID("$Id: login.c,v 1.22 2000/02/02 08:17:41 damien Exp $");
49 * is found). The name of the host used last time is returned in buf. 49 * is found). The name of the host used last time is returned in buf.
50 */ 50 */
51 51
52unsigned long 52unsigned long
53get_last_login_time(uid_t uid, const char *logname, 53get_last_login_time(uid_t uid, const char *logname,
54 char *buf, unsigned int bufsize) 54 char *buf, unsigned int bufsize)
55{ 55{
@@ -135,7 +135,7 @@ get_last_login_time(uid_t uid, const char *logname,
135 * were more standardized. 135 * were more standardized.
136 */ 136 */
137 137
138void 138void
139record_login(int pid, const char *ttyname, const char *user, uid_t uid, 139record_login(int pid, const char *ttyname, const char *user, uid_t uid,
140 const char *host, struct sockaddr * addr) 140 const char *host, struct sockaddr * addr)
141{ 141{
@@ -273,7 +273,7 @@ record_login(int pid, const char *ttyname, const char *user, uid_t uid,
273 273
274/* Records that the user has logged out. */ 274/* Records that the user has logged out. */
275 275
276void 276void
277record_logout(int pid, const char *ttyname) 277record_logout(int pid, const char *ttyname)
278{ 278{
279#ifdef HAVE_LIBUTIL_LOGIN 279#ifdef HAVE_LIBUTIL_LOGIN