diff options
author | charnier <charnier@FreeBSD.org> | 1998-01-07 07:54:18 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1998-01-07 07:54:18 +0000 |
commit | 7d9a2cfbe3036389564163aa6599c1a1113aa23e (patch) | |
tree | 786c88fb7cdc7710a09abd5840479715bba7b857 /libexec/rpc.rusersd | |
parent | 4cc8746553f64933dbe86087328c6bfff866ad92 (diff) | |
download | FreeBSD-src-7d9a2cfbe3036389564163aa6599c1a1113aa23e.zip FreeBSD-src-7d9a2cfbe3036389564163aa6599c1a1113aa23e.tar.gz |
Remove unused #includes and make it compile again with -DDEBUG. Use syslog()
instead of errx() when being a daemon.
Diffstat (limited to 'libexec/rpc.rusersd')
-rw-r--r-- | libexec/rpc.rusersd/rusers_proc.c | 19 | ||||
-rw-r--r-- | libexec/rpc.rusersd/rusersd.c | 3 |
2 files changed, 10 insertions, 12 deletions
diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c index c8c217c..ab7fe27 100644 --- a/libexec/rpc.rusersd/rusers_proc.c +++ b/libexec/rpc.rusersd/rusers_proc.c @@ -33,19 +33,16 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: rusers_proc.c,v 1.7 1997/11/26 07:36:50 charnier Exp $"; #endif /* not lint */ -#include <err.h> -#include <rpc/rpc.h> -#include <signal.h> +#ifdef DEBUG +#include <errno.h> +#endif #include <stdio.h> #include <string.h> #include <sys/param.h> -#include <sys/socket.h> #include <sys/stat.h> -#include <sys/time.h> -#include <sys/types.h> #include <syslog.h> #include <utmp.h> #ifdef XIDLE @@ -248,7 +245,7 @@ rusers_num() ufp = fopen(_PATH_UTMP, "r"); if (!ufp) { syslog(LOG_ERR, "%m"); - return(0); + return(NULL); } /* only entries with both name and line fields */ @@ -383,8 +380,10 @@ rusers_service(rqstp, transp) if (result != NULL && !svc_sendreply(transp, xdr_result, result)) { svcerr_systemerr(transp); } - if (!svc_freeargs(transp, xdr_argument, &argument)) - errx(1, "unable to free arguments"); + if (!svc_freeargs(transp, xdr_argument, &argument)) { + syslog(LOG_ERR, "unable to free arguments"); + exit(1); + } leave: if (from_inetd) exit(0); diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c index 5cc4faf..5d96f9e 100644 --- a/libexec/rpc.rusersd/rusersd.c +++ b/libexec/rpc.rusersd/rusersd.c @@ -33,10 +33,9 @@ #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: rusersd.c,v 1.6 1997/11/26 07:36:51 charnier Exp $"; #endif /* not lint */ -#include <stdio.h> #include <stdlib.h> #include <rpc/rpc.h> #include <rpc/pmap_clnt.h> |