version 1.1.1.2, 2012/05/29 12:26:49
|
version 1.1.1.4, 2013/07/22 10:46:12
|
Line 1
|
Line 1
|
/* |
/* |
* Copyright (c) 2010 Todd C. Miller <Todd.Miller@courtesan.com> | * Copyright (c) 2010-2013 Todd C. Miller <Todd.Miller@courtesan.com> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
Line 54 static linux_audit_open(void)
|
Line 54 static linux_audit_open(void)
|
if (au_fd == -1) { |
if (au_fd == -1) { |
/* Kernel may not have audit support. */ |
/* Kernel may not have audit support. */ |
if (errno != EINVAL && errno != EPROTONOSUPPORT && errno != EAFNOSUPPORT) |
if (errno != EINVAL && errno != EPROTONOSUPPORT && errno != EAFNOSUPPORT) |
error(1, _("unable to open audit system")); | fatal(_("unable to open audit system")); |
} else { |
} else { |
(void)fcntl(au_fd, F_SETFD, FD_CLOEXEC); |
(void)fcntl(au_fd, F_SETFD, FD_CLOEXEC); |
} |
} |
Line 78 linux_audit_command(char *argv[], int result)
|
Line 78 linux_audit_command(char *argv[], int result)
|
command = cp = emalloc(size); |
command = cp = emalloc(size); |
for (av = argv; *av != NULL; av++) { |
for (av = argv; *av != NULL; av++) { |
n = strlcpy(cp, *av, size - (cp - command)); |
n = strlcpy(cp, *av, size - (cp - command)); |
if (n >= size - (cp - command)) | if (n >= size - (cp - command)) { |
errorx(1, _("internal error, linux_audit_command() overflow")); | fatalx(_("internal error, %s overflow"), |
| "linux_audit_command()"); |
| } |
cp += n; |
cp += n; |
*cp++ = ' '; |
*cp++ = ' '; |
} |
} |