mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-09-05 16:55:32 +00:00
Fix the return size of aa_getprocattr
aa_getprocattr is returning the size of the buffer not the size of the data read that it is supposed to return. Also update the man page to reflect the return value as documented in the functions, and update the test cases to check the return value. Signed-off-by: John Johansen <john.johansen@canonical.com> Steve Beattie <sbeattie@ubuntu.com>
This commit is contained in:
@@ -280,11 +280,10 @@ int aa_getprocattr(pid_t tid, const char *attr, char **buf, char **mode)
|
||||
free(buffer);
|
||||
*buf = NULL;
|
||||
*mode = NULL;
|
||||
size = -1;
|
||||
} else
|
||||
*buf = buffer;
|
||||
|
||||
return size;
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int setprocattr(pid_t tid, const char *attr, const char *buf, int len)
|
||||
|
Reference in New Issue
Block a user