diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2010-08-24 06:58:54 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-08-27 19:59:42 -0400 |
commit | a2f13ad0ba5d94b9768c28469b45ca1e81a2b895 (patch) | |
tree | 3c9bd63cb165bbb4427399b3e87deb74911cd97d /fs | |
parent | 0fb85621df4f9f7c663c6c77c302e821a832c95e (diff) |
fanotify: Return EPERM when a process is not privileged
The appropriate error code when privileged operations are denied is
EPERM, not EACCES.
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Eric Paris <paris@paris.rdu.redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/notify/fanotify/fanotify_user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index b966b7230f47..5ed8e58d7bfc 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c | |||
@@ -641,7 +641,7 @@ SYSCALL_DEFINE2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags) | |||
641 | __func__, flags, event_f_flags); | 641 | __func__, flags, event_f_flags); |
642 | 642 | ||
643 | if (!capable(CAP_SYS_ADMIN)) | 643 | if (!capable(CAP_SYS_ADMIN)) |
644 | return -EACCES; | 644 | return -EPERM; |
645 | 645 | ||
646 | if (flags & ~FAN_ALL_INIT_FLAGS) | 646 | if (flags & ~FAN_ALL_INIT_FLAGS) |
647 | return -EINVAL; | 647 | return -EINVAL; |