diff options
author | Todd C. Miller <Todd.Miller@courtesan.com> | 2015-06-19 14:51:17 -0600 |
---|---|---|
committer | Todd C. Miller <Todd.Miller@courtesan.com> | 2015-06-19 14:51:17 -0600 |
commit | dc18fe9cd02a89db53e196df14a671185923e083 (patch) | |
tree | 62c9c4b2fccff267ed6c00b3fa76ff47ad617bda /src/selinux.c | |
parent | 390537c3ebb547a873ef798308c8cb74b2ca6052 (diff) | |
download | sudo-dc18fe9cd02a89db53e196df14a671185923e083.tar.gz |
Add function name to "unable to allocate memory" warnings.
Diffstat (limited to 'src/selinux.c')
-rw-r--r-- | src/selinux.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/selinux.c b/src/selinux.c index a017f4456..76d25acb0 100644 --- a/src/selinux.c +++ b/src/selinux.c @@ -82,7 +82,7 @@ audit_role_change(const security_context_t old_context, rc = asprintf(&message, "newrole: old-context=%s new-context=%s", old_context, new_context); if (rc == -1) - sudo_fatalx(U_("unable to allocate memory")); + sudo_fatalx(U_("%s: %s"), __func__, U_("unable to allocate memory")); rc = audit_log_user_message(au_fd, AUDIT_USER_ROLE_CHANGE, message, NULL, NULL, ttyn, result); if (rc <= 0) @@ -289,7 +289,7 @@ get_exec_context(security_context_t old_context, const char *role, const char *t * Convert "context" back into a string and verify it. */ if ((new_context = strdup(context_str(context))) == NULL) { - sudo_warnx(U_("unable to allocate memory")); + sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory")); goto bad; } if (security_check_context(new_context) < 0) { @@ -412,7 +412,7 @@ selinux_execve(const char *path, char *const argv[], char *const envp[], continue; nargv = reallocarray(NULL, argc + 2, sizeof(char *)); if (nargv == NULL) { - sudo_warnx(U_("unable to allocate memory")); + sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory")); debug_return; } if (noexec) |