mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
last_patch64 from Vladimir N. Oleynik <dzo@simtreas.ru>
This commit is contained in:
parent
eebe31d997
commit
5a7ec22c49
@ -111,7 +111,7 @@
|
|||||||
APPLET(crond, crond_main, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)
|
APPLET(crond, crond_main, _BB_DIR_USR_SBIN, _BB_SUID_NEVER)
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_CRONTAB
|
#ifdef CONFIG_CRONTAB
|
||||||
APPLET(crontab, crontab_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
|
APPLET(crontab, crontab_main, _BB_DIR_USR_BIN, _BB_SUID_ALWAYS)
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_CUT
|
#ifdef CONFIG_CUT
|
||||||
APPLET(cut, cut_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
|
APPLET(cut, cut_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
|
||||||
|
@ -204,14 +204,14 @@ crontab_main(int ac, char **av)
|
|||||||
int n;
|
int n;
|
||||||
|
|
||||||
snprintf(path, sizeof(path), "%s.new", pas->pw_name);
|
snprintf(path, sizeof(path), "%s.new", pas->pw_name);
|
||||||
if ((fd = open(path, O_CREAT|O_TRUNC|O_EXCL|O_APPEND|O_WRONLY, 0600)) >= 0) {
|
if ((fd = open(path, O_CREAT|O_TRUNC|O_APPEND|O_WRONLY, 0600)) >= 0) {
|
||||||
while ((n = read(repFd, buf, sizeof(buf))) > 0) {
|
while ((n = read(repFd, buf, sizeof(buf))) > 0) {
|
||||||
write(fd, buf, n);
|
write(fd, buf, n);
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
rename(path, pas->pw_name);
|
rename(path, pas->pw_name);
|
||||||
} else {
|
} else {
|
||||||
error_msg("unable to create %s/%s", CDir, buf);
|
error_msg("unable to create %s/%s", CDir, path);
|
||||||
}
|
}
|
||||||
close(repFd);
|
close(repFd);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user