summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2008-06-13 14:48:59 +1000
committerDarren Tucker <dtucker@zip.com.au>2008-06-13 14:48:59 +1000
commit7517b5bd3155a4e29beb6168129a60f022ea9e9f (patch)
tree261ce7988668b7edfa5ab1eea441aeb5511aefb1
parent2c91b28a6da35f2e499414f8f6585f4f11410935 (diff)
- dtucker@cvs.openbsd.org 2008/06/13 01:38:23
[misc.c] upcast uid to long with matching %ld, prevents warnings in portable
-rw-r--r--ChangeLog5
-rw-r--r--misc.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 91caab88f..a6b86f0fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -154,6 +154,9 @@
154 - dtucker@cvs.openbsd.org 2008/06/13 00:51:47 154 - dtucker@cvs.openbsd.org 2008/06/13 00:51:47
155 [mac.c] 155 [mac.c]
156 upcast another size_t to u_long to match format 156 upcast another size_t to u_long to match format
157 - dtucker@cvs.openbsd.org 2008/06/13 01:38:23
158 [misc.c]
159 upcast uid to long with matching %ld, prevents warnings in portable
157 - (dtucker) [clientloop.c serverloop.c] channel_register_filter now 160 - (dtucker) [clientloop.c serverloop.c] channel_register_filter now
158 takes 2 more args. with djm@ 161 takes 2 more args. with djm@
159 - (dtucker) [defines.h] Bug #1112: __dead is, well dead. Based on a patch 162 - (dtucker) [defines.h] Bug #1112: __dead is, well dead. Based on a patch
@@ -4325,4 +4328,4 @@
4325 OpenServer 6 and add osr5bigcrypt support so when someone migrates 4328 OpenServer 6 and add osr5bigcrypt support so when someone migrates
4326 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 4329 passwords between UnixWare and OpenServer they will still work. OK dtucker@
4327 4330
4328$Id: ChangeLog,v 1.5000 2008/06/13 02:40:55 dtucker Exp $ 4331$Id: ChangeLog,v 1.5001 2008/06/13 04:48:59 dtucker Exp $
diff --git a/misc.c b/misc.c
index 01986e8c1..8b303f16f 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.68 2008/06/12 20:38:28 dtucker Exp $ */ 1/* $OpenBSD: misc.c,v 1.69 2008/06/13 01:38:23 dtucker Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -534,7 +534,7 @@ tilde_expand_filename(const char *filename, uid_t uid)
534 if ((pw = getpwnam(user)) == NULL) 534 if ((pw = getpwnam(user)) == NULL)
535 fatal("tilde_expand_filename: No such user %s", user); 535 fatal("tilde_expand_filename: No such user %s", user);
536 } else if ((pw = getpwuid(uid)) == NULL) /* ~/path */ 536 } else if ((pw = getpwuid(uid)) == NULL) /* ~/path */
537 fatal("tilde_expand_filename: No such uid %d", uid); 537 fatal("tilde_expand_filename: No such uid %ld", (long)uid);
538 538
539 if (strlcpy(ret, pw->pw_dir, sizeof(ret)) >= sizeof(ret)) 539 if (strlcpy(ret, pw->pw_dir, sizeof(ret)) >= sizeof(ret))
540 fatal("tilde_expand_filename: Path too long"); 540 fatal("tilde_expand_filename: Path too long");