]> arthur.barton.de Git - netatalk.git/commitdiff
Warning fixes.
authorsrittau <srittau>
Wed, 24 Oct 2001 14:34:33 +0000 (14:34 +0000)
committersrittau <srittau>
Wed, 24 Oct 2001 14:34:33 +0000 (14:34 +0000)
etc/uams/uams_guest.c
etc/uams/uams_randnum.c

index 7d66706276b9c52392562f1140c47bf2ea007d3b..35ab3fd084d27e1649e90c549f65657f1d069e7c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: uams_guest.c,v 1.7 2001-09-06 20:00:59 rufustfirefly Exp $
+ * $Id: uams_guest.c,v 1.8 2001-10-24 14:34:33 srittau Exp $
  *
  * (c) 2001 (see COPYING)
  */
@@ -10,6 +10,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <errno.h>
 
 /* STDC check */
 #if STDC_HEADERS
@@ -52,13 +53,14 @@ static int noauth_login(void *obj, struct passwd **uam_pwd,
 
     strcpy(username, guest);
     if ((pwent = getpwnam(guest)) == NULL) {
-       syslog( LOG_ERR, "noauth_login: getpwnam( %s ): %m", guest);
+       syslog( LOG_ERR, "noauth_login: getpwnam( %s ): %s",
+               guest, strerror(errno) );
        return( AFPERR_BADUAM );
     }
 
 #ifdef AFS
     if ( setpag() < 0 ) {
-       syslog( LOG_ERR, "noauth_login: setpag: %m" );
+       syslog( LOG_ERR, "noauth_login: setpag: %s", strerror(errno) );
        return( AFPERR_BADUAM );
     }
 #endif /* AFS */
@@ -102,7 +104,8 @@ int noauth_printer(start, stop, username, out)
     free(data);
 
     if (getpwnam(username) == NULL) {
-       syslog(LOG_INFO, "Bad Login NoAuthUAM: %s: %m", username);
+       syslog(LOG_INFO, "Bad Login NoAuthUAM: %s: %s",
+              username, strerror(errno) );
        return(-1);
     }
 
index 440d901d609ebd479836761adeb86a45eb1a2f44..3d84bf711c1d621207dfbe1af5398284dcafc73b 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: uams_randnum.c,v 1.6 2001-09-06 20:00:59 rufustfirefly Exp $
+ * $Id: uams_randnum.c,v 1.7 2001-10-24 14:34:33 srittau Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * Copyright (c) 1999 Adrian Sun (asun@u.washington.edu) 
@@ -156,7 +156,7 @@ static int afppasswd(const struct passwd *pwd,
   int i, j, keyfd = -1, err = 0;
   off_t pos;
   
-  if ((fp = fopen(path, (set) ? "r+" : "r")) <= 0) {
+  if ((fp = fopen(path, (set) ? "r+" : "r")) == NULL) {
     syslog( LOG_ERR, "Failed to open %s", path);
     return AFPERR_ACCESS;
   }