summaryrefslogtreecommitdiffstats
path: root/src/lib/eacces-error.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:51:24 +0000
commitf7548d6d28c313cf80e6f3ef89aed16a19815df1 (patch)
treea3f6f2a3f247293bee59ecd28e8cd8ceb6ca064a /src/lib/eacces-error.h
parentInitial commit. (diff)
downloaddovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.tar.xz
dovecot-f7548d6d28c313cf80e6f3ef89aed16a19815df1.zip
Adding upstream version 1:2.3.19.1+dfsg1.upstream/1%2.3.19.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/lib/eacces-error.h')
-rw-r--r--src/lib/eacces-error.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/eacces-error.h b/src/lib/eacces-error.h
new file mode 100644
index 0000000..a15b406
--- /dev/null
+++ b/src/lib/eacces-error.h
@@ -0,0 +1,14 @@
+#ifndef EACCES_ERROR_H
+#define EACCES_ERROR_H
+
+/* Return a user-friendly error message for EACCES failures. */
+const char *eacces_error_get(const char *func, const char *path);
+const char *eacces_error_get_creating(const char *func, const char *path);
+/* Return a user-friendly error message for fchown() or chown() EPERM
+ failures when only the group is being changed. gid_origin specifies why
+ exactly this group is being used. */
+const char *eperm_error_get_chgrp(const char *func, const char *path,
+ gid_t gid, const char *gid_origin)
+ ATTR_NULL(4);
+
+#endif