diff options
author | Mike Barcroft <mike@FreeBSD.org> | 2001-07-26 23:27:10 +0000 |
---|---|---|
committer | Mike Barcroft <mike@FreeBSD.org> | 2001-07-26 23:27:10 +0000 |
commit | f458f48b02dd15d64dc4f654c33030b5702940db (patch) | |
tree | 572d44cb1a31784055dd95ebb2545d1b7a15f62e /usr.bin/chpass/edit.c | |
parent | e598f661517eba66c46d969f311070b5b15d65ea (diff) | |
download | src-f458f48b02dd15d64dc4f654c33030b5702940db.tar.gz src-f458f48b02dd15d64dc4f654c33030b5702940db.zip |
Notes
Diffstat (limited to 'usr.bin/chpass/edit.c')
-rw-r--r-- | usr.bin/chpass/edit.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/chpass/edit.c b/usr.bin/chpass/edit.c index a5d3d5d8d911..849d5d9acff7 100644 --- a/usr.bin/chpass/edit.c +++ b/usr.bin/chpass/edit.c @@ -115,8 +115,9 @@ display(fd, pw) #endif /* YP */ (void)fprintf(fp, "Login: %s\n", pw->pw_name); (void)fprintf(fp, "Password: %s\n", pw->pw_passwd); - (void)fprintf(fp, "Uid [#]: %d\n", pw->pw_uid); - (void)fprintf(fp, "Gid [# or name]: %d\n", pw->pw_gid); + (void)fprintf(fp, "Uid [#]: %lu\n", (unsigned long)pw->pw_uid); + (void)fprintf(fp, "Gid [# or name]: %lu\n", + (unsigned long)pw->pw_gid); (void)fprintf(fp, "Change [month day year]: %s\n", ttoa(pw->pw_change)); (void)fprintf(fp, "Expire [month day year]: %s\n", @@ -255,9 +256,10 @@ bad: (void)fclose(fp); pw->pw_gecos[len - 1] = '\0'; if (snprintf(buf, sizeof(buf), - "%s:%s:%d:%d:%s:%ld:%ld:%s:%s:%s", - pw->pw_name, pw->pw_passwd, pw->pw_uid, pw->pw_gid, pw->pw_class, - pw->pw_change, pw->pw_expire, pw->pw_gecos, pw->pw_dir, + "%s:%s:%lu:%lu:%s:%ld:%ld:%s:%s:%s", + pw->pw_name, pw->pw_passwd, (unsigned long)pw->pw_uid, + (unsigned long)pw->pw_gid, pw->pw_class, (long)pw->pw_change, + (long)pw->pw_expire, pw->pw_gecos, pw->pw_dir, pw->pw_shell) >= sizeof(buf)) { warnx("entries too long"); free(p); |