diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-05-16 14:30:26 +0200 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-05-16 14:30:26 +0200 |
| commit | 351fec332a074cc7599e34c70e00f53d8ef74df9 (patch) | |
| tree | fedbf34e42caa14c261e3b3321ae07f799391197 /libbb | |
| parent | d83aff1aeddeb617f4cd3303bee220306005d0af (diff) | |
| download | busybox-w32-351fec332a074cc7599e34c70e00f53d8ef74df9.tar.gz busybox-w32-351fec332a074cc7599e34c70e00f53d8ef74df9.tar.bz2 busybox-w32-351fec332a074cc7599e34c70e00f53d8ef74df9.zip | |
busybox.conf: code shrink
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
| -rw-r--r-- | libbb/appletlib.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 86b5cd381..30224ed94 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
| @@ -440,19 +440,18 @@ static void parse_config_file(void) | |||
| 440 | /* Now get the user/group info. */ | 440 | /* Now get the user/group info. */ |
| 441 | 441 | ||
| 442 | s = skip_whitespace(e); | 442 | s = skip_whitespace(e); |
| 443 | if (*s == '\0') | 443 | /* Default is 0.0, else parse USER.GROUP: */ |
| 444 | s = strcpy(buffer, "0.0"); | 444 | if (*s) { |
| 445 | 445 | /* We require whitespace between mode and USER.GROUP */ | |
| 446 | /* We require whitespace between mode and USER.GROUP */ | 446 | if ((s == e) || !(e = strchr(s, '.'))) { |
| 447 | if ((s == e) || !(e = strchr(s, '.'))) { | 447 | errmsg = "uid.gid"; |
| 448 | errmsg = "uid.gid"; | 448 | goto pe_label; |
| 449 | goto pe_label; | 449 | } |
| 450 | } | 450 | *e = ':'; /* get_uidgid needs USER:GROUP syntax */ |
| 451 | 451 | if (get_uidgid(&sct->m_ugid, s, /*allow_numeric:*/ 1) == 0) { | |
| 452 | *e = ':'; /* get_uidgid needs USER:GROUP syntax */ | 452 | errmsg = "unknown user/group"; |
| 453 | if (get_uidgid(&sct->m_ugid, s, /*allow_numeric:*/ 1) == 0) { | 453 | goto pe_label; |
| 454 | errmsg = "unknown user/group"; | 454 | } |
| 455 | goto pe_label; | ||
| 456 | } | 455 | } |
| 457 | } | 456 | } |
| 458 | continue; | 457 | continue; |
