diff options
author | 2015-09-01 19:54:00 +0000 | |
---|---|---|
committer | 2015-09-01 19:54:00 +0000 | |
commit | 137e52c28d0b3c8593db2d083b101b18dc53addb (patch) | |
tree | 59850bcd88a21799817060c1cece5e0e853894c1 /lib/libc/rpc/auth_unix.c | |
parent | Display the correct source address when using a non-default routing (diff) | |
download | wireguard-openbsd-137e52c28d0b3c8593db2d083b101b18dc53addb.tar.xz wireguard-openbsd-137e52c28d0b3c8593db2d083b101b18dc53addb.zip |
Remove all bogus writes to stderr. Only explicit requests should
go that way.
ok miod beck
Diffstat (limited to 'lib/libc/rpc/auth_unix.c')
-rw-r--r-- | lib/libc/rpc/auth_unix.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c index 099b977c0c4..6aaeceeb019 100644 --- a/lib/libc/rpc/auth_unix.c +++ b/lib/libc/rpc/auth_unix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth_unix.c,v 1.22 2010/09/01 14:43:34 millert Exp $ */ +/* $OpenBSD: auth_unix.c,v 1.23 2015/09/01 19:54:00 deraadt Exp $ */ /* * Copyright (c) 2010, Oracle America, Inc. @@ -103,15 +103,12 @@ authunix_create(char *machname, int uid, int gid, int len, int *aup_gids) */ auth = (AUTH *)mem_alloc(sizeof(*auth)); #ifndef KERNEL - if (auth == NULL) { - (void)fprintf(stderr, "authunix_create: out of memory\n"); + if (auth == NULL) return (NULL); - } #endif au = (struct audata *)mem_alloc(sizeof(*au)); #ifndef KERNEL if (au == NULL) { - (void)fprintf(stderr, "authunix_create: out of memory\n"); free(auth); return (NULL); } @@ -143,10 +140,8 @@ authunix_create(char *machname, int uid, int gid, int len, int *aup_gids) #ifdef KERNEL au->au_origcred.oa_base = mem_alloc((u_int) len); #else - if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL) { - (void)fprintf(stderr, "authunix_create: out of memory\n"); + if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL) goto authfail; - } #endif memcpy(au->au_origcred.oa_base, mymem, (u_int)len); |