diff options
-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> |