summaryrefslogtreecommitdiffabout
path: root/lib
authorSergey Poznyakoff <gray@gnu.org.ua>2003-09-05 09:03:00 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2003-09-05 09:03:00 (GMT)
commit53dab91058bccd0bee7dcf7f520dbf49c8b30143 (patch) (side-by-side diff)
treef418dd2c91ac73a6d2a7a9f6bfe449b9eadadc1d /lib
parent5e2675817ac312938e7b0d29fe6a8a9c5aab2ae8 (diff)
downloadmailutils-53dab91058bccd0bee7dcf7f520dbf49c8b30143.tar.gz
mailutils-53dab91058bccd0bee7dcf7f520dbf49c8b30143.tar.bz2
(mu_fcheck_perm, mu_check_perm): Return
MU_ERR_UNSAFE_PERMS when appropriate.
Diffstat (limited to 'lib') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/mu_dbm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/mu_dbm.c b/lib/mu_dbm.c
index 6bf9c68..618d2a9 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,8 +47,8 @@ mu_fcheck_perm (int fd, int mode)
}
if ((st.st_mode & 0777) != mode)
{
- errno = EPERM;
- return 1;
+ errno = MU_ERR_UNSAFE_PERMS;
+ return 1;
}
return 0;
}
@@ -68,8 +69,8 @@ mu_check_perm (const char *name, int mode)
}
if ((st.st_mode & 0777) != mode)
{
- errno = EPERM;
- return 1;
+ errno = MU_ERR_UNSAFE_PERMS;
+ return 1;
}
return 0;
}

Return to:

Send suggestions and report system problems to the System administrator.