diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-09-05 09:03:00 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-09-05 09:03:00 +0000 |
commit | 53dab91058bccd0bee7dcf7f520dbf49c8b30143 (patch) | |
tree | f418dd2c91ac73a6d2a7a9f6bfe449b9eadadc1d /lib | |
parent | 5e2675817ac312938e7b0d29fe6a8a9c5aab2ae8 (diff) | |
download | mailutils-53dab91058bccd0bee7dcf7f520dbf49c8b30143.tar.gz mailutils-53dab91058bccd0bee7dcf7f520dbf49c8b30143.tar.bz2 |
(mu_fcheck_perm, mu_check_perm): Return
MU_ERR_UNSAFE_PERMS when appropriate.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mu_dbm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mu_dbm.c b/lib/mu_dbm.c index 6bf9c68a6..618d2a901 100644 --- a/lib/mu_dbm.c +++ b/lib/mu_dbm.c @@ -29,6 +29,7 @@ # include <strings.h> #endif #include <errno.h> +#include <mailutils/errno.h> #include <mu_dbm.h> #include <xalloc.h> @@ -46,7 +47,7 @@ mu_fcheck_perm (int fd, int mode) } if ((st.st_mode & 0777) != mode) { - errno = EPERM; + errno = MU_ERR_UNSAFE_PERMS; return 1; } return 0; @@ -68,7 +69,7 @@ mu_check_perm (const char *name, int mode) } if ((st.st_mode & 0777) != mode) { - errno = EPERM; + errno = MU_ERR_UNSAFE_PERMS; return 1; } return 0; |