add some consts
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5519 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1995, 1996, 1997 Kungliga Tekniska H<>gskolan
|
* Copyright (c) 1995, 1996, 1997, 1999 Kungliga Tekniska H<>gskolan
|
||||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
@@ -41,7 +41,8 @@
|
|||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
|
||||||
void
|
void
|
||||||
prepare_utmp (struct utmp *utmp, char *tty, char *username, char *hostname)
|
prepare_utmp (struct utmp *utmp, char *tty,
|
||||||
|
const char *username, const char *hostname)
|
||||||
{
|
{
|
||||||
char *ttyx = clean_ttyname (tty);
|
char *ttyx = clean_ttyname (tty);
|
||||||
|
|
||||||
@@ -81,12 +82,15 @@ prepare_utmp (struct utmp *utmp, char *tty, char *username, char *hostname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_UTMPX_H
|
#ifdef HAVE_UTMPX_H
|
||||||
void utmp_login(char *tty, char *username, char *hostname) { return; }
|
void utmp_login(char *tty, const char *username, const char *hostname)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* update utmp and wtmp - the BSD way */
|
/* update utmp and wtmp - the BSD way */
|
||||||
|
|
||||||
void utmp_login(char *tty, char *username, char *hostname)
|
void utmp_login(char *tty, const char *username, const char *hostname)
|
||||||
{
|
{
|
||||||
struct utmp utmp;
|
struct utmp utmp;
|
||||||
int fd;
|
int fd;
|
||||||
|
@@ -7,11 +7,11 @@ RCSID("$Id$");
|
|||||||
/* utmpx_login - update utmp and wtmp after login */
|
/* utmpx_login - update utmp and wtmp after login */
|
||||||
|
|
||||||
#ifndef HAVE_UTMPX_H
|
#ifndef HAVE_UTMPX_H
|
||||||
int utmpx_login(char *line, char *user, char *host) { return 0; }
|
int utmpx_login(char *line, const char *user, const char *host) { return 0; }
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static void
|
static void
|
||||||
utmpx_update(struct utmpx *ut, char *line, char *user, char *host)
|
utmpx_update(struct utmpx *ut, char *line, const char *user, const char *host)
|
||||||
{
|
{
|
||||||
struct timeval tmp;
|
struct timeval tmp;
|
||||||
char *clean_tty = clean_ttyname(line);
|
char *clean_tty = clean_ttyname(line);
|
||||||
@@ -49,7 +49,7 @@ utmpx_update(struct utmpx *ut, char *line, char *user, char *host)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
utmpx_login(char *line, char *user, char *host)
|
utmpx_login(char *line, const char *user, const char *host)
|
||||||
{
|
{
|
||||||
struct utmpx *ut;
|
struct utmpx *ut;
|
||||||
pid_t mypid = getpid();
|
pid_t mypid = getpid();
|
||||||
|
Reference in New Issue
Block a user