$OpenBSD: patch-libcnupm_cnupm_restrict_c,v 1.1.1.1 2004/05/13 06:52:36 grange Exp $
--- libcnupm/cnupm_restrict.c.orig	2004-04-22 10:17:58.000000000 +0700
+++ libcnupm/cnupm_restrict.c	2004-04-26 20:28:27.000000000 +0700
@@ -55,7 +55,7 @@ cnupm_restrict(struct passwd *pw)
 #endif	/* HAVE_INITGROUPS */
 #endif	/* HAVE_LOGIN_CAP */
 		return (-1);
-	if (chroot(pw->pw_dir) < 0 || chdir("/") < 0 || setuid(pw->pw_uid) < 0)
+	if (chroot(pw->pw_dir) < 0 || setuid(pw->pw_uid) < 0 || chdir("/") < 0)
 		return (-1);
 	return (0);
 }
