diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2015-10-21 15:02:16 +0800 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2015-10-21 15:59:04 -0400 |
commit | d6b93982b25643328481379a456ee60680104502 (patch) | |
tree | ce25ff5006591cb744d1b2040a5af837f8d64478 /meta-networking/recipes-daemons | |
parent | 10b879d2ad80ceef883f99aad06003d130150812 (diff) | |
download | meta-openembedded-d6b93982b25643328481379a456ee60680104502.tar.gz |
postfix.inc: do not hardcode userid and groupid
It hardcoded to assign vmail's userid and groupid with 5000,
which caused the following useradd/groupadd is increased from
5000 at do_root time. Such as 'tracing' group id is 5001
(tracing group is added in lttng-tools).
It is better to allocate it dynamically.
BTW, you may google to find the hardcoded 5000 in following site:
https://help.ubuntu.com/community/PostfixVirtualMailBoxClamSmtpHowto
In its main.cf, it also hardcoded virtual_uid_maps and virtual_gid_maps.
...
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
..
But in meta-oe's main.cf_2.0, it assigned virtual_uid_maps and
virtual_gid_maps with a search.
...
virtual_uid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 3`
virtual_gid_maps = static:`grep vmail /etc/passwd | cut -d ":" -f 4`
...
So please feel free to forget 5000.
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-daemons')
-rw-r--r-- | meta-networking/recipes-daemons/postfix/postfix.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc index 3e7f91867..6d39570d3 100644 --- a/meta-networking/recipes-daemons/postfix/postfix.inc +++ b/meta-networking/recipes-daemons/postfix/postfix.inc | |||
@@ -36,9 +36,9 @@ INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ." | |||
36 | USERADD_PACKAGES = "${PN}" | 36 | USERADD_PACKAGES = "${PN}" |
37 | USERADD_PARAM_${PN} = \ | 37 | USERADD_PARAM_${PN} = \ |
38 | "-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \ | 38 | "-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \ |
39 | -d /var/spool/vmail -r -u 5000 -g vmail --shell /bin/false vmail \ | 39 | -d /var/spool/vmail -r -g vmail --shell /bin/false vmail \ |
40 | " | 40 | " |
41 | GROUPADD_PARAM_${PN} = "--system postfix;--system postdrop;-g 5000 --system vmail" | 41 | GROUPADD_PARAM_${PN} = "--system postfix;--system postdrop;--system vmail" |
42 | 42 | ||
43 | export SYSLIBS = "${LDFLAGS}" | 43 | export SYSLIBS = "${LDFLAGS}" |
44 | 44 | ||