summaryrefslogtreecommitdiffstats
path: root/usr.sbin/rpc.yppasswdd
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2002-02-06 13:30:31 +0000
committerdes <des@FreeBSD.org>2002-02-06 13:30:31 +0000
commit0f2cb9b020b907000a28323fc57a82fdb7d6626d (patch)
treed44f2702502c982570c85130c91c845a83ea8052 /usr.sbin/rpc.yppasswdd
parent0e1bb965cc26648289a6a22baf0ad5ef4891edb4 (diff)
downloadFreeBSD-src-0f2cb9b020b907000a28323fc57a82fdb7d6626d.zip
FreeBSD-src-0f2cb9b020b907000a28323fc57a82fdb7d6626d.tar.gz
Apply the following mechanical transformations in preparation for
ansification and constification: s{\s+__P\((\(.*?\))\)}{$1}g; s{\(\s+}{\(}g; s{\s+\)}{\)}g; s{\s+,}{,}g; s{(\s+)(for|if|switch|while)\(}{$1$2 \(}g; s{return ([^\(].*?);}{return ($1);}g; s{([\w\)])([!=+/\*-]?=)([\w\(+-])}{$1 $2 $3}g; s{\s+$}{\n};g Also add $FreeBSD$ where needed. MFC after: 1 week
Diffstat (limited to 'usr.sbin/rpc.yppasswdd')
-rw-r--r--usr.sbin/rpc.yppasswdd/pw_util.c2
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_extern.h18
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_main.c2
-rw-r--r--usr.sbin/rpc.yppasswdd/yppasswdd_server.c12
4 files changed, 17 insertions, 17 deletions
diff --git a/usr.sbin/rpc.yppasswdd/pw_util.c b/usr.sbin/rpc.yppasswdd/pw_util.c
index f65f03d..86535b8 100644
--- a/usr.sbin/rpc.yppasswdd/pw_util.c
+++ b/usr.sbin/rpc.yppasswdd/pw_util.c
@@ -150,7 +150,7 @@ pw_mkdb(username)
/* Temporarily turn off SIGCHLD catching */
install_reaper(0);
if (!(pid = vfork())) {
- if(!username) {
+ if (!username) {
execl(_PATH_PWD_MKDB, "pwd_mkdb", "-p", tempname,
(char *)NULL);
} else {
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_extern.h b/usr.sbin/rpc.yppasswdd/yppasswdd_extern.h
index eec2684..5590639 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_extern.h
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_extern.h
@@ -57,14 +57,14 @@
extern char *yp_dir;
extern char *progname;
-extern void do_master __P(( void ));
-extern void yppasswdprog_1 __P(( struct svc_req *, register SVCXPRT * ));
-extern void master_yppasswdprog_1 __P(( struct svc_req *,
- register SVCXPRT * ));
-extern void reaper __P(( int ));
-extern void install_reaper __P(( int ));
-extern int pw_copy __P(( int, int, struct passwd * ));
-extern char *ok_shell __P (( char * ));
+extern void do_master(void);
+extern void yppasswdprog_1(struct svc_req *, register SVCXPRT *);
+extern void master_yppasswdprog_1 __P((struct svc_req *,
+ register SVCXPRT *));
+extern void reaper(int);
+extern void install_reaper(int);
+extern int pw_copy(int, int, struct passwd *);
+extern char *ok_shell __P ((char *));
extern char *passfile;
extern char *passfile_default;
extern char *tempname;
@@ -76,4 +76,4 @@ extern int multidomain;
extern int resvport;
extern int inplace;
extern int verbose;
-extern int _rpc_dtablesize __P((void));
+extern int _rpc_dtablesize(void);
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
index 8684810..be42263 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_main.c
@@ -169,7 +169,7 @@ main(argc, argv)
debug = 1;
while ((ch = getopt(argc, argv, "t:d:p:sfamuivh")) != -1) {
- switch(ch) {
+ switch (ch) {
case 't':
passfile_default = optarg;
break;
diff --git a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
index d61390d..ab70560 100644
--- a/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
+++ b/usr.sbin/rpc.yppasswdd/yppasswdd_server.c
@@ -76,7 +76,7 @@ void reaper(sig)
if (sig > 0) {
if (sig == SIGCHLD)
- while(wait3(&st, WNOHANG, NULL) > 0) ;
+ while (wait3(&st, WNOHANG, NULL) > 0) ;
} else {
pid = waitpid(pid, &pstat, 0);
}
@@ -538,7 +538,7 @@ yppasswdproc_update_1_svc(yppasswd *argp, struct svc_req *rqstp)
key.data = argp->newpw.pw_name;
key.size = strlen(argp->newpw.pw_name);
- if ((rval=yp_get_record(domain,"master.passwd.byname",
+ if ((rval = yp_get_record(domain,"master.passwd.byname",
&key, &data, 0)) != YP_TRUE) {
if (rval == YP_NOKEY) {
yp_error("user %s not found in passwd database",
@@ -642,7 +642,7 @@ cleaning up and bailing out");
}
}
- switch((pid = fork())) {
+ switch ((pid = fork())) {
case 0:
if (inplace && !rval) {
execlp(MAP_UPDATE_PATH, MAP_UPDATE, passfile,
@@ -733,7 +733,7 @@ procedure!\n", inet_ntoa(rqhost->sin_addr), rqhost->sin_port);
svcerr_auth(transp, AUTH_BADCRED);
return(&result);
}
-
+
if (uid) {
yp_error("caller euid is %d, expecting 0 -- rejecting request",
uid);
@@ -794,7 +794,7 @@ allow additions to be made to the password database");
snprintf(passfile_buf, sizeof(passfile_buf),
"%s/%s/master.passwd", yp_dir, argp->domain);
passfile = (char *)&passfile_buf;
- }
+ }
if ((pfd = pw_lock()) < 0) {
return (&result);
@@ -828,7 +828,7 @@ cleaning up and bailing out");
}
}
- switch((pid = fork())) {
+ switch ((pid = fork())) {
case 0:
if (inplace && !rval) {
execlp(MAP_UPDATE_PATH, MAP_UPDATE, passfile,
OpenPOWER on IntegriCloud