Mercurial > masqmail
comparison src/permissions.c @ 87:3cbcc46c7d49
added a comment on how to make group uucp trusted too
this is intended to be a hack only for those who really need it
author | meillo@marmaro.de |
---|---|
date | Sat, 19 Jun 2010 18:52:19 +0200 |
parents | ffeff2c33799 |
children | 996b53a50f55 |
comparison
equal
deleted
inserted
replaced
86:92673a185add | 87:3cbcc46c7d49 |
---|---|
49 } | 49 } |
50 | 50 |
51 gboolean | 51 gboolean |
52 is_privileged_user(uid_t uid) | 52 is_privileged_user(uid_t uid) |
53 { | 53 { |
54 /* uncomment these lines if you need the `uucp' group to be trusted too | |
55 struct group* grent = getgrnam("uucp"); | |
56 | |
57 if (is_ingroup(uid, grent->gr_gid)) { | |
58 return TRUE; | |
59 } | |
60 */ | |
61 | |
54 return (uid == 0) || (uid == conf.mail_uid) || (is_ingroup(uid, conf.mail_gid)); | 62 return (uid == 0) || (uid == conf.mail_uid) || (is_ingroup(uid, conf.mail_gid)); |
55 } | 63 } |
56 | 64 |
57 void | 65 void |
58 set_euidgid(gint uid, gint gid, uid_t * old_uid, gid_t * old_gid) | 66 set_euidgid(gint uid, gint gid, uid_t * old_uid, gid_t * old_gid) |