From 2e7897495782bf04835cf18c52dbcfec3fcfe61e Mon Sep 17 00:00:00 2001 From: Mike Barcroft Date: Thu, 26 Jul 2001 23:27:10 +0000 Subject: Prevent chpass(1) from writing -1 in the UID or GID fields in the password file by properly casting integers. PR: 27757 Reviewed by: des Approved by: des MFC after: 4 days --- chpass/chpass.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'chpass/chpass.c') diff --git a/chpass/chpass.c b/chpass/chpass.c index 69e700f..f10a9d6 100644 --- a/chpass/chpass.c +++ b/chpass/chpass.c @@ -173,7 +173,8 @@ main(argc, argv) #else case 0: if (!(pw = getpwuid(uid))) - errx(1, "unknown user: uid %u", uid); + errx(1, "unknown user: uid %lu", + (unsigned long)uid); break; case 1: if (!(pw = getpwnam(*argv))) -- cgit v1.2.3-56-ge451