diff options
author | davidn <davidn@FreeBSD.org> | 1997-01-22 02:07:55 +0000 |
---|---|---|
committer | davidn <davidn@FreeBSD.org> | 1997-01-22 02:07:55 +0000 |
commit | 71e4601fc6c0f29a521c5a608087cb622ff639e6 (patch) | |
tree | fa9af94bc3212a68ca7083153520cb635c3105f2 /sbin | |
parent | 7a02d1469fc277de47333714482ba31901b7020e (diff) | |
download | FreeBSD-src-71e4601fc6c0f29a521c5a608087cb622ff639e6.zip FreeBSD-src-71e4601fc6c0f29a521c5a608087cb622ff639e6.tar.gz |
Style police.
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/init/init.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c index cd3fc99..bd3ab67 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -74,10 +74,6 @@ static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 7/15/93"; #ifdef LOGIN_CAP #include <login_cap.h> -#define RESOURCE_RC "daemon" -#define RESOURCE_WINDOW "default" -#define RESOURCE_GETTY "default" -static void setprocresources __P((const char *)); #endif #include "pathnames.h" @@ -98,6 +94,9 @@ extern void logwtmp __P((const char *, const char *, const char *)); #define WINDOW_WAIT 3 /* wait N secs after starting window */ #define STALL_TIMEOUT 30 /* wait N secs after warning */ #define DEATH_WATCH 10 /* wait N secs for procs to die */ +#define RESOURCE_RC "daemon" +#define RESOURCE_WINDOW "default" +#define RESOURCE_GETTY "default" void handle __P((sig_t, ...)); void delset __P((sigset_t *, ...)); @@ -169,6 +168,9 @@ void alrm_handler __P((int)); void setsecuritylevel __P((int)); int getsecuritylevel __P((void)); int setupargv __P((session_t *, struct ttyent *)); +#ifdef LOGIN_CAP +void setprocresources __P((const char *)); +#endif int clang; void clear_session_logs __P((session_t *)); @@ -747,7 +749,6 @@ runcom() #ifdef LOGIN_CAP setprocresources(RESOURCE_RC); #endif - execv(_PATH_BSHELL, argv); stall("can't exec %s for %s: %m", _PATH_BSHELL, _PATH_RUNCOM); _exit(1); /* force single user mode */ @@ -1454,14 +1455,14 @@ strk (char *p) } #ifdef LOGIN_CAP -static void -setprocresources(const char *cname) +void +setprocresources(cname) + const char *cname; { - login_cap_t *lc = login_getclassbyname(cname, NULL); - if (lc != NULL) { - setusercontext(lc, NULL, 0, LOGIN_SETPRIORITY|LOGIN_SETRESOURCES); - login_close(lc); - } + login_cap_t *lc; + if ((lc = login_getclassbyname(cname, (char*)NULL)) != NULL) { + setusercontext(lc, (struct passwd*)NULL, 0, LOGIN_SETPRIORITY|LOGIN_SETRESOURCES); + login_close(lc); + } } #endif - |