busybox.conf: code shrink

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2011-05-16 14:30:26 +02:00
parent d83aff1aed
commit 351fec332a

View File

@ -440,21 +440,20 @@ static void parse_config_file(void)
/* Now get the user/group info. */ /* Now get the user/group info. */
s = skip_whitespace(e); s = skip_whitespace(e);
if (*s == '\0') /* Default is 0.0, else parse USER.GROUP: */
s = strcpy(buffer, "0.0"); if (*s) {
/* We require whitespace between mode and USER.GROUP */ /* We require whitespace between mode and USER.GROUP */
if ((s == e) || !(e = strchr(s, '.'))) { if ((s == e) || !(e = strchr(s, '.'))) {
errmsg = "uid.gid"; errmsg = "uid.gid";
goto pe_label; goto pe_label;
} }
*e = ':'; /* get_uidgid needs USER:GROUP syntax */ *e = ':'; /* get_uidgid needs USER:GROUP syntax */
if (get_uidgid(&sct->m_ugid, s, /*allow_numeric:*/ 1) == 0) { if (get_uidgid(&sct->m_ugid, s, /*allow_numeric:*/ 1) == 0) {
errmsg = "unknown user/group"; errmsg = "unknown user/group";
goto pe_label; goto pe_label;
} }
} }
}
continue; continue;
} }