diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-02-06 15:26:07 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-02-06 15:26:07 +0000 |
commit | dc584ddbc5eb111cdb9863e2652621d7b5e9ba76 (patch) | |
tree | 9c2a46d61c0b1ec2538854e870b6861acfd2ee7a /usr.sbin/rpc.yppasswdd | |
parent | ed4d1c46a27632aa553e7c24c969262bfc2d5c97 (diff) | |
download | src-test2-dc584ddbc5eb111cdb9863e2652621d7b5e9ba76.tar.gz src-test2-dc584ddbc5eb111cdb9863e2652621d7b5e9ba76.zip |
Notes
Diffstat (limited to 'usr.sbin/rpc.yppasswdd')
-rw-r--r-- | usr.sbin/rpc.yppasswdd/pw_copy.c | 4 | ||||
-rw-r--r-- | usr.sbin/rpc.yppasswdd/pw_util.c | 13 | ||||
-rw-r--r-- | usr.sbin/rpc.yppasswdd/yppasswdd_main.c | 15 | ||||
-rw-r--r-- | usr.sbin/rpc.yppasswdd/yppasswdd_server.c | 44 |
4 files changed, 34 insertions, 42 deletions
diff --git a/usr.sbin/rpc.yppasswdd/pw_copy.c b/usr.sbin/rpc.yppasswdd/pw_copy.c index 99a79ca376b4..24caf4d3c746 100644 --- a/usr.sbin/rpc.yppasswdd/pw_copy.c +++ b/usr.sbin/rpc.yppasswdd/pw_copy.c @@ -52,9 +52,7 @@ static const char rcsid[] = #include "yppasswdd_extern.h" int -pw_copy(ffd, tfd, pw) - int ffd, tfd; - struct passwd *pw; +pw_copy(int ffd, int tfd, struct passwd *pw) { FILE *from, *to; int done; diff --git a/usr.sbin/rpc.yppasswdd/pw_util.c b/usr.sbin/rpc.yppasswdd/pw_util.c index 86535b87cbb1..bd85b1501bf4 100644 --- a/usr.sbin/rpc.yppasswdd/pw_util.c +++ b/usr.sbin/rpc.yppasswdd/pw_util.c @@ -67,7 +67,7 @@ int pstat; pid_t pid; void -pw_init() +pw_init(void) { struct rlimit rlim; @@ -99,7 +99,7 @@ pw_init() static int lockfd; int -pw_lock() +pw_lock(void) { /* * If the master password file doesn't exist, the system is hosed. @@ -120,7 +120,7 @@ pw_lock() } int -pw_tmp() +pw_tmp(void) { static char path[MAXPATHLEN]; int fd; @@ -141,8 +141,7 @@ pw_tmp() } int -pw_mkdb(username) - const char *username; +pw_mkdb(const char *username) { yp_error("rebuilding the database..."); @@ -172,9 +171,7 @@ pw_mkdb(username) } void -pw_error(name, err, eval) - const char *name; - int err, eval; +pw_error(const char *name, int err, int eval) { if (err && name != NULL) yp_error("%s", name); diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c index be422633d745..b261feb644ed 100644 --- a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c +++ b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c @@ -97,8 +97,8 @@ int resvport = 1; int inplace = 0; char *sockname = YP_SOCKNAME; -static void terminate(sig) - int sig; +static void +terminate(int sig) { rpcb_unset(YPPASSWDPROG, YPPASSWDVERS, NULL); rpcb_unset(MASTER_YPPASSWDPROG, MASTER_YPPASSWDVERS, NULL); @@ -106,8 +106,8 @@ static void terminate(sig) exit(0); } -static void reload(sig) - int sig; +static void +reload(int sig) { load_securenets(); } @@ -142,7 +142,8 @@ closedown(int sig) (void) alarm(_RPCSVC_CLOSEDOWN/2); } -static void usage() +static void +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: rpc.yppasswdd [-t master.passwd file] [-d domain] [-p path] [-s]", @@ -151,9 +152,7 @@ static void usage() } int -main(argc, argv) - int argc; - char *argv[]; +main(int argc, char *argv[]) { register SVCXPRT *transp = NULL; struct sockaddr_in saddr; diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c index ab70560d667e..2ba3bac46791 100644 --- a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c +++ b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c @@ -64,8 +64,8 @@ struct dom_binding {}; char *tempname; -void reaper(sig) - int sig; +void +reaper(int sig) { extern pid_t pid; extern int pstat; @@ -85,8 +85,8 @@ void reaper(sig) return; } -void install_reaper(on) - int on; +void +install_reaper(int on) { if (on) { signal(SIGCHLD, reaper); @@ -98,9 +98,8 @@ void install_reaper(on) static struct passwd yp_password; -static void copy_yp_pass(p, x, m) -char *p; -int x, m; +static void +copy_yp_pass(char *p, int x, int m) { register char *t, *s = p; static char *buf; @@ -148,8 +147,8 @@ int x, m; return; } -static int validchars(arg) - char *arg; +static int +validchars(char *arg) { int i; @@ -171,9 +170,8 @@ static int validchars(arg) return(0); } -static int validate_master(opw, npw) - struct passwd *opw; - struct x_master_passwd *npw; +static int +validate_master(struct passwd *opw, struct x_master_passwd *npw) { if (npw->pw_name[0] == '+' || npw->pw_name[0] == '-') { @@ -198,9 +196,8 @@ static int validate_master(opw, npw) return(0); } -static int validate(opw, npw) - struct passwd *opw; - struct x_passwd *npw; +static int +validate(struct passwd *opw, struct x_passwd *npw) { if (npw->pw_name[0] == '+' || npw->pw_name[0] == '-') { @@ -259,8 +256,8 @@ static int validate(opw, npw) * all agree), then we use that domain. If we match the user in * more than one database, we must abort. */ -static char *find_domain(pw) - struct x_passwd *pw; +static char * +find_domain(struct x_passwd *pw) { struct stat statbuf; struct dirent *dirp; @@ -314,9 +311,8 @@ static char *find_domain(pw) return((char *)&domain); } -static int update_inplace(pw, domain) - struct passwd *pw; - char *domain; +static int +update_inplace(struct passwd *pw, char *domain) { DB *dbp = NULL; DBT key = { NULL, 0 }; @@ -454,7 +450,8 @@ with the same name - continuing"); return(0); } -static char *yp_mktmpnam() +static char * +yp_mktmpnam(void) { static char path[MAXPATHLEN]; char *p; @@ -694,8 +691,9 @@ cleaning up and bailing out"); * than the last one. Since only the superuser is allowed to use it, * it is assumed that the caller knows what he's doing. */ -int *yppasswdproc_update_master_1_svc(master_yppasswd *argp, - struct svc_req *rqstp) +int * +yppasswdproc_update_master_1_svc(master_yppasswd *argp, + struct svc_req *rqstp) { static int result; int pfd, tfd; |