[BusyBox-cvs] busybox/miscutils crond.c,1.7,1.8 crontab.c,1.5,1.6
Glenn McGrath
bug1 at busybox.net
Tue Sep 2 02:36:41 UTC 2003
- Previous message: [BusyBox-cvs] busybox/loginutils adduser.c, 1.7, 1.8 login.c, 1.12, 1.13 su.c, 1.5, 1.6
- Next message: [BusyBox-cvs] busybox/networking ifupdown.c, 1.31, 1.32 telnetd.c, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/busybox/miscutils
In directory winder:/tmp/cvs-serv18900/miscutils
Modified Files:
crond.c crontab.c
Log Message:
move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
constant.
Vodz last_patch_107
Index: crontab.c
===================================================================
RCS file: /var/cvs/busybox/miscutils/crontab.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- crontab.c 14 Jul 2003 19:14:26 -0000 1.5
+++ crontab.c 2 Sep 2003 02:36:14 -0000 1.6
@@ -320,7 +320,7 @@
ptr = PATH_VI;
snprintf(visual, sizeof(visual), "%s %s", ptr, file);
- execl("/bin/sh", "/bin/sh", "-c", visual, NULL);
+ execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", visual, NULL);
perror("exec");
exit(0);
}
@@ -360,7 +360,7 @@
}
setenv("USER", pas->pw_name, 1);
setenv("HOME", pas->pw_dir, 1);
- setenv("SHELL", "/bin/sh", 1);
+ setenv("SHELL", DEFAULT_SHELL, 1);
/*
* Change running state to the user in question
Index: crond.c
===================================================================
RCS file: /var/cvs/busybox/miscutils/crond.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- crond.c 28 Jul 2003 09:37:56 -0000 1.7
+++ crond.c 2 Sep 2003 02:36:14 -0000 1.8
@@ -54,9 +54,6 @@
#define MAXLINES 256 /* max lines in non-root crontabs */
#endif
-static const char def_sh[] = "/bin/sh";
-
-
typedef struct CronFile {
struct CronFile *cf_Next;
struct CronLine *cf_LineBase;
@@ -313,7 +310,7 @@
}
setenv("USER", pas->pw_name, 1);
setenv("HOME", pas->pw_dir, 1);
- setenv("SHELL", def_sh, 1);
+ setenv("SHELL", DEFAULT_SHELL, 1);
/*
* Change running state to the user in question
@@ -997,7 +994,7 @@
user, mailFile);
}
- ForkJob(user, line, mailFd, def_sh, "-c", line->cl_Shell, mailFile);
+ ForkJob(user, line, mailFd, DEFAULT_SHELL, "-c", line->cl_Shell, mailFile);
}
/*
@@ -1081,12 +1078,12 @@
#ifdef FEATURE_DEBUG_OPT
if (DebugOpt)
- crondlog("\005Child Running %s\n", def_sh);
+ crondlog("\005Child Running %s\n", DEFAULT_SHELL);
#endif
- execl(def_sh, def_sh, "-c", line->cl_Shell, NULL);
+ execl(DEFAULT_SHELL, DEFAULT_SHELL, "-c", line->cl_Shell, NULL);
crondlog("\024unable to exec, user %s cmd %s -c %s\n", user,
- def_sh, line->cl_Shell);
+ DEFAULT_SHELL, line->cl_Shell);
exit(0);
} else if (pid < 0) {
/*
- Previous message: [BusyBox-cvs] busybox/loginutils adduser.c, 1.7, 1.8 login.c, 1.12, 1.13 su.c, 1.5, 1.6
- Next message: [BusyBox-cvs] busybox/networking ifupdown.c, 1.31, 1.32 telnetd.c, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the busybox-cvs
mailing list