]> arthur.barton.de Git - netatalk.git/commitdiff
Removed special code that would get compiled if UAM_RANDNUM was defined.
authorsrittau <srittau>
Thu, 25 Oct 2001 20:42:55 +0000 (20:42 +0000)
committersrittau <srittau>
Thu, 25 Oct 2001 20:42:55 +0000 (20:42 +0000)
This is now done in Makefile.am (where stuff like this belongs).

Warning fix.

bin/afppasswd/afppasswd.c

index f5d7110aa18e3338404f18cc2b6edb297a70d119..65da4b9c9e0687fe1cf8bdb24e48040f93de34d0 100644 (file)
@@ -1,5 +1,5 @@
 /* 
- * $Id: afppasswd.c,v 1.8 2001-09-06 20:00:59 rufustfirefly Exp $
+ * $Id: afppasswd.c,v 1.9 2001-10-25 20:42:55 srittau Exp $
  *
  * Copyright 1999 (c) Adrian Sun (asun@u.washington.edu)
  * All Rights Reserved. See COPYRIGHT.
@@ -41,6 +41,7 @@ char *strchr (), *strrchr ();
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <errno.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */
@@ -55,7 +56,6 @@ char *strchr (), *strrchr ();
 
 #include <netatalk/endian.h>
 
-#ifdef UAM_RNDNUM
 #include <des.h>
 
 #ifdef USE_CRACKLIB
@@ -256,7 +256,8 @@ static int create_file(const char *path, uid_t minuid)
     strcat(buf, FORMAT);
     len = strlen(buf);
     if (write(fd, buf, len) != len) {
-      fprintf(stderr, "afppasswd: problem writing to %s: %m\n", path);
+      fprintf(stderr, "afppasswd: problem writing to %s: %s\n", path,
+             strerror(errno));
       err = -1;
       break;
     }
@@ -370,13 +371,3 @@ int main(int argc, char **argv)
     return -1;
   }
 }
-#else /* UAM_RNDNUM */
-
-main(int argc, char **argv)
-{
-  fprintf(stderr, "afppasswd is only useful if you're using centralized passwords\n");
-  fprintf(stderr, "for the Random Number authentication methods.\n");
-  return -1;
-}
-
-#endif /* UAM_RNDNUM */