entry.c:396 load_entry() info: redundant null check on e->pwd calling free()
entry.c:398 load_entry() info: redundant null check on e->cmd calling free()
/usr/include/bits/fcntl.h:48:10: warning: preprocessor token O_NOFOLLOW redefined
macros.h:136:9: this was the original definition
security.c:98:44: warning: non-ANSI function declaration of function 'cron_restore_default_security_context'
crontab.c:439:29: warning: non-ANSI function declaration of function 'tmp_path'
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
fprintf(stderr, "\"%s\":%d: %s\n", Filename, LineNumber - 1, msg);
}
-static const char *tmp_path() {
+static const char *tmp_path(void) {
const char *tmpdir = NULL;
if ((getuid() == geteuid()) && (getgid() == getegid())) {
eof:
if (e->envp)
env_free(e->envp);
- if (e->pwd)
- free(e->pwd);
- if (e->cmd)
- free(e->cmd);
+ free(e->pwd);
+ free(e->cmd);
free(e);
while (ch != '\n' && !feof(file))
ch = get_char(file);
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
+
/* these are really immutable, and are
* defined for symbolic convenience only
* TRUE, FALSE, and ERR must be distinct
* we will just have to live without it. In order for this to be an
* issue an attacker would have to subvert group CRON_GROUP.
*/
+#include <fcntl.h>
#ifndef O_NOFOLLOW
#define O_NOFOLLOW 0
#endif
char **jobenv);
#endif
-void cron_restore_default_security_context() {
+void cron_restore_default_security_context(void) {
#ifdef WITH_SELINUX
setexeccon(NULL);
#endif