ps: conditionally enable -T on non-DESKTOP build too
[oweals/busybox.git] / miscutils / crontab.c
index 902014963dc951054a12068aad84fee0af3de217..34b80ea37a3c4283c921646141b0091273f887cf 100644 (file)
@@ -12,9 +12,7 @@
 
 #include "libbb.h"
 
-#ifndef CRONTABS
-#define CRONTABS        "/var/spool/cron/crontabs"
-#endif
+#define CRONTABS        CONFIG_FEATURE_CROND_DIR "/crontabs"
 #ifndef CRONUPDATE
 #define CRONUPDATE      "cron.update"
 #endif
@@ -126,9 +124,7 @@ int crontab_main(int argc UNUSED_PARAM, char **argv)
        }
 
        if (opt_ler & OPT_u) {
-               pas = getpwnam(user_name);
-               if (!pas)
-                       bb_error_msg_and_die("user %s is not known", user_name);
+               pas = xgetpwnam(user_name);
        } else {
                pas = xgetpwuid(getuid());
        }