Merge "liblog: reject empty logging messages"

This commit is contained in:
Mark Salyzyn 2015-03-18 23:44:20 +00:00 committed by Gerrit Code Review
commit 4e0a252372
1 changed files with 4 additions and 0 deletions

View File

@ -178,6 +178,10 @@ static int __write_to_log_daemon(log_id_t log_id, struct iovec *vec, size_t nr)
static pid_t last_pid = (pid_t) -1;
static atomic_int_fast32_t dropped;
if (!nr) {
return -EINVAL;
}
if (last_uid == AID_ROOT) { /* have we called to get the UID yet? */
last_uid = getuid();
}