diff options
author | 1996-07-22 02:00:12 +0000 | |
---|---|---|
committer | 1996-07-22 02:00:12 +0000 | |
commit | d336ec138569d52df2d3f78ea38a290e85962ed0 (patch) | |
tree | e29991ce9db30afc9529560bcf19dd7fac49f6b3 | |
parent | seteuid for chdir (diff) | |
download | wireguard-openbsd-d336ec138569d52df2d3f78ea38a290e85962ed0.tar.xz wireguard-openbsd-d336ec138569d52df2d3f78ea38a290e85962ed0.zip |
do not chdir as root
-rw-r--r-- | libexec/uucpd/uucpd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c index c40dc198ea7..98d3c67e3c0 100644 --- a/libexec/uucpd/uucpd.c +++ b/libexec/uucpd/uucpd.c @@ -42,7 +42,7 @@ char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)uucpd.c 5.10 (Berkeley) 2/26/91";*/ -static char rcsid[] = "$Id: uucpd.c,v 1.1.1.1 1995/10/18 08:43:25 deraadt Exp $"; +static char rcsid[] = "$Id: uucpd.c,v 1.2 1996/07/22 02:00:12 deraadt Exp $"; #endif /* not lint */ /* @@ -195,8 +195,8 @@ struct sockaddr_in *sinp; dologin(pw, sinp); setgid(pw->pw_gid); initgroups(pw->pw_name, pw->pw_gid); - chdir(pw->pw_dir); setuid(pw->pw_uid); + chdir(pw->pw_dir); execl(_PATH_UUCICO, "uucico", (char *)0); perror("uucico server: execl"); } |