diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2007-05-07 11:01:36 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2007-05-07 11:01:36 +0000 |
commit | 1e0d0fa4b98797bd9bc398af86558c7983981adf (patch) | |
tree | 156f0cb1ff88973e8ca03670b1ab583c3e664064 /usr.bin | |
parent | 813852de0c761217983e900cc6546dec2adffef7 (diff) | |
download | FreeBSD-src-1e0d0fa4b98797bd9bc398af86558c7983981adf.zip FreeBSD-src-1e0d0fa4b98797bd9bc398af86558c7983981adf.tar.gz |
Fix some warnings by making things const, adding missing headers,
removing some unused variables and making a variable unsigned.
MFC after: 3 weeks
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/login/login.h | 3 | ||||
-rw-r--r-- | usr.bin/login/login_audit.c | 6 | ||||
-rw-r--r-- | usr.bin/login/login_fbtab.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/usr.bin/login/login.h b/usr.bin/login/login.h index 9d1b921..48ef31b 100644 --- a/usr.bin/login/login.h +++ b/usr.bin/login/login.h @@ -29,7 +29,8 @@ void login_fbtab(char *, uid_t, gid_t); #ifdef USE_BSM_AUDIT void au_login_success(void); -void au_login_fail(char *errmsg, int na); +void au_login_fail(const char *errmsg, int na); +void audit_logout(void); #endif extern char **environ; diff --git a/usr.bin/login/login_audit.c b/usr.bin/login/login_audit.c index 0e0e091..a50a158 100644 --- a/usr.bin/login/login_audit.c +++ b/usr.bin/login/login_audit.c @@ -43,6 +43,8 @@ __FBSDID("$FreeBSD$"); #include <errno.h> #include <pwd.h> #include <stdio.h> +#include <strings.h> +#include <unistd.h> #include "login.h" @@ -109,7 +111,7 @@ au_login_success(void) * login attempts: header, subject, text, return. */ void -au_login_fail(char *errmsg, int na) +au_login_fail(const char *errmsg, int na) { token_t *tok; int aufd; @@ -170,8 +172,6 @@ audit_logout(void) { token_t *tok; int aufd; - au_mask_t aumask; - auditinfo_t auinfo; uid_t uid = pwd->pw_uid; gid_t gid = pwd->pw_gid; pid_t pid = getpid(); diff --git a/usr.bin/login/login_fbtab.c b/usr.bin/login/login_fbtab.c index c0a4290..684cf61 100644 --- a/usr.bin/login/login_fbtab.c +++ b/usr.bin/login/login_fbtab.c @@ -133,7 +133,7 @@ gid_t gid; { glob_t gl; char *path; - int i; + unsigned int i; if (glob(pattern, GLOB_NOSORT, NULL, &gl) != 0) return; |