summaryrefslogtreecommitdiff
path: root/sbin/dhclient/dhclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r--sbin/dhclient/dhclient.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index cfb4bb7d888..5540fafafa4 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.52 2004/05/13 07:19:32 henning Exp $ */
+/* $OpenBSD: dhclient.c,v 1.53 2004/06/03 18:59:44 henning Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -283,8 +283,11 @@ main(int argc, char *argv[])
if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1)
error("cannot open %s: %m", _PATH_DEVNULL);
- if ((pw = getpwnam("_dhcp")) == NULL)
- error("no such user: _dhcp");
+ if ((pw = getpwnam("_dhcp")) == NULL) {
+ warning("no such user: _dhcp, falling back to \"nobody\"");
+ if ((pw = getpwnam("nobody")) == NULL)
+ error("no such user: nobody");
+ }
if (pipe(pipe_fd) == -1)
error("pipe");