]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - pw/pw_conf.c
pw_checkname since the beginning if too strict on GECOS field,
[pw-darwin.git] / pw / pw_conf.c
index 41ab79b2f1778f68a9f90aacdf6fdaa94a493742..e9606b4e6a2f0563354b0223c4501955b67a73bf 100644 (file)
@@ -31,11 +31,11 @@ static const char rcsid[] =
 
 #include <sys/types.h>
 #include <sys/sbuf.h>
-#include <inttypes.h>
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
+
 #include <err.h>
+#include <fcntl.h>
+#include <string.h>
+#include <unistd.h>
 
 #include "pw.h"
 
@@ -493,11 +493,11 @@ write_userconfig(struct userconf *cnf, const char *file)
                        quote = 0;
                        break;
                case _UC_EXPIRE:
-                       sbuf_printf(buf, "%ld", cnf->expire_days);
+                       sbuf_printf(buf, "%jd", (intmax_t)cnf->expire_days);
                        quote = 0;
                        break;
                case _UC_PASSWORD:
-                       sbuf_printf(buf, "%ld", cnf->password_days);
+                       sbuf_printf(buf, "%jd", (intmax_t)cnf->password_days);
                        quote = 0;
                        break;
                case _UC_NONE: