svn commit: trunk/busybox/miscutils

vodz at busybox.net vodz at busybox.net
Tue Jan 10 12:35:44 UTC 2006


Author: vodz
Date: 2006-01-10 04:35:43 -0800 (Tue, 10 Jan 2006)
New Revision: 13223

Log:
can use TMPDIR if user's HOMEDIR do not found. Noticed by Bernhard

Modified:
   trunk/busybox/miscutils/crontab.c


Changeset:
Modified: trunk/busybox/miscutils/crontab.c
===================================================================
--- trunk/busybox/miscutils/crontab.c	2006-01-10 06:36:00 UTC (rev 13222)
+++ trunk/busybox/miscutils/crontab.c	2006-01-10 12:35:43 UTC (rev 13223)
@@ -342,7 +342,7 @@
      * Obtain password entry and change privileges
      */
 
-    if ((pas = getpwnam(user)) == 0) {
+    if ((pas = getpwnam(user)) == NULL) {
 	bb_perror_msg_and_die("failed to get uid for %s", user);
 	return(-1);
     }
@@ -357,7 +357,7 @@
 
     if (dochdir) {
 	if (chdir(pas->pw_dir) < 0) {
-	    bb_perror_msg_and_die("chdir failed: %s %s", user, pas->pw_dir);
+	    bb_perror_msg("chdir failed: %s %s", user, pas->pw_dir);
 	    if (chdir(TMPDIR) < 0) {
 		bb_perror_msg_and_die("chdir failed: %s %s", user, TMPDIR);
 		return(-1);




More information about the busybox-cvs mailing list