Searched defs:gid (Results 1 - 25 of 31) sorted by relevance

12

/dovecot/src/lib/
H A Dsafe-mkdir.c10 int safe_mkdir(const char *dir, mode_t mode, uid_t uid, gid_t gid) argument
43 (st.st_gid != gid && gid != (gid_t)-1)) {
44 if (fchown(fd, uid, gid) < 0)
70 (st.st_gid != gid && gid != (gid_t)-1)) {
74 dec2str(uid), dec2str(gid));
H A Dunix-socket-create.c11 uid_t uid, gid_t gid, int backlog)
25 if (uid != (uid_t)-1 || gid != (gid_t)-1) {
27 if (chown(path, uid, gid) < 0) {
29 path, dec2str(uid), dec2str(gid));
10 unix_socket_create(const char *path, int mode, uid_t uid, gid_t gid, int backlog) argument
H A Dfile-create-locked.h16 gid_t gid; member in struct:file_create_settings
H A Drestrict-access.h15 gid_t gid; member in struct:restrict_access_settings
30 displayed on error messages about failing to change uid/gid. */
H A Dsafe-mkstemp.c16 safe_mkstemp_full(string_t *prefix, mode_t mode, uid_t uid, gid_t gid, argument
53 if (uid == (uid_t)-1 && gid == (gid_t)-1)
56 if (fchown(fd, uid, gid) < 0) {
59 str_c(prefix), gid, gid_origin));
64 gid == (gid_t)-1 ? -1L : (long)gid);
74 int safe_mkstemp(string_t *prefix, mode_t mode, uid_t uid, gid_t gid) argument
76 return safe_mkstemp_full(prefix, mode, uid, gid, NULL);
80 gid_t gid, const char *gid_origin)
82 return safe_mkstemp_full(prefix, mode, (uid_t)-1, gid, gid_origi
79 safe_mkstemp_group(string_t *prefix, mode_t mode, gid_t gid, const char *gid_origin) argument
85 safe_mkstemp_hostpid(string_t *prefix, mode_t mode, uid_t uid, gid_t gid) argument
96 safe_mkstemp_hostpid_group(string_t *prefix, mode_t mode, gid_t gid, const char *gid_origin) argument
[all...]
H A Dnet.h34 gid_t gid; member in struct:net_unix_cred
H A Dfile-create-locked.c56 gid_t gid = set->mkdir_gid != 0 ? set->mkdir_gid : (gid_t)-1; local
64 ret = mkdir_parents_chown(dir, set->mkdir_mode, uid, gid);
67 gid, set->gid_origin);
84 uid_t gid = set->gid != 0 ? set->gid : (gid_t)-1; local
89 fd = safe_mkstemp(temp_path, mode, uid, gid);
91 fd = safe_mkstemp_group(temp_path, mode, gid, set->gid_origin);
H A Dipwd.c91 int i_getgrgid(gid_t gid, struct group *grp_r) argument
98 errno = getgrgid_r(gid, grp_r, grbuf, grbuf_size, &result);
H A Dmkdir-parents.c15 gid_t gid, const char *gid_origin)
49 if (fchown(fd, uid, gid) < 0) {
57 i_error("%s", eperm_error_get_chgrp("fchown", path, gid,
73 gid == (gid_t)-1 ? -1L : (long)gid);
74 if (gid != (gid_t)-1) {
84 if (gid != (gid_t)-1 && (mode & S_ISGID) == 0) {
101 int mkdir_chown(const char *path, mode_t mode, uid_t uid, gid_t gid) argument
103 return mkdir_chown_full(path, mode, uid, gid, NULL);
107 gid_t gid, cons
14 mkdir_chown_full(const char *path, mode_t mode, uid_t uid, gid_t gid, const char *gid_origin) argument
106 mkdir_chgrp(const char *path, mode_t mode, gid_t gid, const char *gid_origin) argument
113 mkdir_parents_chown_full(const char *path, mode_t mode, uid_t uid, gid_t gid, const char *gid_origin) argument
143 mkdir_parents_chown(const char *path, mode_t mode, uid_t uid, gid_t gid) argument
148 mkdir_parents_chgrp(const char *path, mode_t mode, gid_t gid, const char *gid_origin) argument
[all...]
H A Deacces-error.c13 static bool is_in_group(gid_t gid) argument
18 if (getegid() == gid)
23 if (gids[i] == gid)
267 str_printfa(errmsg, ", conflicting dir gid=%s(%s)",
287 gid_t gid, const char *gid_origin)
295 str_printfa(errmsg, "%s(%s, group=%s", func, path, dec2str(gid));
296 group = getgrgid(gid);
286 eperm_error_get_chgrp(const char *func, const char *path, gid_t gid, const char *gid_origin) argument
H A Drestrict-access.c29 set->gid = (gid_t)-1;
47 static const char *get_gid_str(gid_t gid) argument
53 if (i_getgrgid(gid, &group) <= 0)
54 ret = dec2str(gid);
56 ret = t_strdup_printf("%s(%s)", dec2str(gid), group.gr_name);
79 str_printfa(str, ") failed with euid=%s, gid=%s, egid=%s: %m "
158 gid_t gid; local
160 if (str_to_gid(name, &gid) == 0)
161 return gid;
176 gid_t gid, *gid_lis local
[all...]
/dovecot/src/lib-auth/
H A Dauth-master.h22 gid_t gid; member in struct:auth_user_reply
/dovecot/src/auth/
H A Ddb-passwd-file.h11 gid_t gid; member in struct:passwd_user
H A Duserdb-template.c19 gid_t gid; local
46 } else if (strcasecmp(key, "gid") == 0) {
47 gid = userdb_parse_gid(NULL, nonull_value);
48 if (gid == (gid_t)-1) {
49 i_fatal("%s userdb: Invalid gid: %s",
52 value = dec2str(gid);
H A Duserdb-vpopmail.c89 gid_t gid; local
97 /* we have to get uid/gid separately, because the gid field in
98 struct vqpasswd isn't really gid at all but just some flags... */
99 if (vget_assign(vpop_domain, NULL, 0, &uid, &gid) == NULL) {
117 if (make_user_dir(vpop_user, vpop_domain, uid, gid) == NULL) {
144 auth_request_set_userdb_field(auth_request, "gid", dec2str(gid));
H A Duserdb.c88 gid_t gid; local
93 if (str_to_gid(str, &gid) == 0)
94 return gid;
H A Ddb-ldap.h74 gid_t gid; member in struct:ldap_settings
/dovecot/src/imap-hibernate/
H A Dimap-client.h15 gid_t gid; member in struct:imap_client_state
/dovecot/src/lib-index/
H A Dmailbox-log.c29 gid_t gid; member in struct:mailbox_log
55 log->gid = (gid_t)-1;
79 gid_t gid, const char *gid_origin)
82 log->gid = gid;
110 if (fchown(log->fd, (uid_t)-1, log->gid) < 0) {
115 log->filepath, log->gid,
78 mailbox_log_set_permissions(struct mailbox_log *log, mode_t mode, gid_t gid, const char *gid_origin) argument
/dovecot/src/lib-storage/
H A Dmail-user.h45 gid_t gid; member in struct:mail_user
/dovecot/src/master/
H A Dservice-listen.c39 uid_t gid = l->set.fileset.gid; local
42 (gid == (gid_t)-1 || gid == master_gid))
45 if (chown(l->set.fileset.set->path, uid, gid) < 0) {
48 (long long)uid, (long long)gid);
H A Dmaster-settings.c745 gid_t gid; local
753 mode = login_want_core_dumps(set, &gid) ? 0770 : 0750;
754 if (safe_mkdir(login_dir, mode, master_uid, gid) == 0) {
H A Dservice.h34 gid_t gid; member in struct:service_listener::__anon153::__anon154
55 gid_t gid; member in struct:service
H A Dservice.c43 gid_t gid; local
56 if (get_uidgid(set->user, &l->set.fileset.uid, &gid, error_r) < 0)
58 else if (get_gid(set->group, &l->set.fileset.gid, error_r) < 0)
184 gid_t gid; local
188 if (get_gid(*tmp, &gid, error_r) < 0)
193 str_append(str, dec2str(gid));
235 /* default gid to user's primary group */
236 if (get_uidgid(set->user, &service->uid, &service->gid, error_r) < 0) {
255 if (get_gid(set->group, &service->gid, error_r) < 0) {
/dovecot/src/plugins/quota/
H A Dquota-fs.c76 gid_t gid; member in struct:fs_quota_root
95 root->gid = getegid();
492 i_debug("quota-fs: host=%s, path=%s, gid=%s",
493 host, path, dec2str(root->gid));
510 args.gqa_id = root->gid;
538 i_debug("quota-fs: gid=%s, bytes=%"PRIu64"/%"PRIu64" "
540 dec2str(root->gid),
548 i_debug("quota-fs: gid=%s, limit=unlimited",
549 dec2str(root->gid));
580 id = group ? root->gid
[all...]

Completed in 50 milliseconds

12