aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
Diffstat (limited to 'networking')
-rw-r--r--networking/httpd.c4
-rw-r--r--networking/libiproute/libnetlink.c2
-rw-r--r--networking/tcpudp.c7
-rw-r--r--networking/tftp.c2
4 files changed, 6 insertions, 9 deletions
diff --git a/networking/httpd.c b/networking/httpd.c
index f7e044d27..8c4242e44 100644
--- a/networking/httpd.c
+++ b/networking/httpd.c
@@ -2351,9 +2351,7 @@ int httpd_main(int argc UNUSED_PARAM, char **argv)
2351#endif 2351#endif
2352#if ENABLE_FEATURE_HTTPD_SETUID 2352#if ENABLE_FEATURE_HTTPD_SETUID
2353 if (opt & OPT_SETUID) { 2353 if (opt & OPT_SETUID) {
2354 if (!get_uidgid(&ugid, s_ugid, 1)) 2354 xget_uidgid(&ugid, s_ugid);
2355 bb_error_msg_and_die("unknown user[:group] "
2356 "name '%s'", s_ugid);
2357 } 2355 }
2358#endif 2356#endif
2359 2357
diff --git a/networking/libiproute/libnetlink.c b/networking/libiproute/libnetlink.c
index 6b599d91c..01454fbf5 100644
--- a/networking/libiproute/libnetlink.c
+++ b/networking/libiproute/libnetlink.c
@@ -37,7 +37,7 @@ int FAST_FUNC xrtnl_open(struct rtnl_handle *rth/*, unsigned subscriptions*/)
37 xbind(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local)); 37 xbind(rth->fd, (struct sockaddr*)&rth->local, sizeof(rth->local));
38 addr_len = sizeof(rth->local); 38 addr_len = sizeof(rth->local);
39 if (getsockname(rth->fd, (struct sockaddr*)&rth->local, &addr_len) < 0) 39 if (getsockname(rth->fd, (struct sockaddr*)&rth->local, &addr_len) < 0)
40 bb_perror_msg_and_die("cannot getsockname"); 40 bb_perror_msg_and_die("getsockname");
41 if (addr_len != sizeof(rth->local)) 41 if (addr_len != sizeof(rth->local))
42 bb_error_msg_and_die("wrong address length %d", addr_len); 42 bb_error_msg_and_die("wrong address length %d", addr_len);
43 if (rth->local.nl_family != AF_NETLINK) 43 if (rth->local.nl_family != AF_NETLINK)
diff --git a/networking/tcpudp.c b/networking/tcpudp.c
index 29408c5be..d6731198c 100644
--- a/networking/tcpudp.c
+++ b/networking/tcpudp.c
@@ -216,8 +216,7 @@ int tcpudpsvd_main(int argc UNUSED_PARAM, char **argv)
216 if (max_per_host > cmax) 216 if (max_per_host > cmax)
217 max_per_host = cmax; 217 max_per_host = cmax;
218 if (option_mask32 & OPT_u) { 218 if (option_mask32 & OPT_u) {
219 if (!get_uidgid(&ugid, user, 1)) 219 xget_uidgid(&ugid, user);
220 bb_error_msg_and_die("unknown user/group: %s", user);
221 } 220 }
222#ifdef SSLSVD 221#ifdef SSLSVD
223 if (option_mask32 & OPT_U) ssluser = optarg; 222 if (option_mask32 & OPT_U) ssluser = optarg;
@@ -245,9 +244,9 @@ int tcpudpsvd_main(int argc UNUSED_PARAM, char **argv)
245 if (option_mask32 & OPT_u) 244 if (option_mask32 & OPT_u)
246 if (!uidgid_get(&sslugid, ssluser, 1)) { 245 if (!uidgid_get(&sslugid, ssluser, 1)) {
247 if (errno) { 246 if (errno) {
248 bb_perror_msg_and_die("fatal: cannot get user/group: %s", ssluser); 247 bb_perror_msg_and_die("can't get user/group: %s", ssluser);
249 } 248 }
250 bb_error_msg_and_die("unknown user/group '%s'", ssluser); 249 bb_error_msg_and_die("unknown user/group %s", ssluser);
251 } 250 }
252 if (!cert) cert = "./cert.pem"; 251 if (!cert) cert = "./cert.pem";
253 if (!key) key = cert; 252 if (!key) key = cert;
diff --git a/networking/tftp.c b/networking/tftp.c
index d09a6eba5..07d672dcb 100644
--- a/networking/tftp.c
+++ b/networking/tftp.c
@@ -225,7 +225,7 @@ static int tftp_protocol(
225 if (user_opt) { 225 if (user_opt) {
226 struct passwd *pw = getpwnam(user_opt); 226 struct passwd *pw = getpwnam(user_opt);
227 if (!pw) 227 if (!pw)
228 bb_error_msg_and_die("unknown user '%s'", user_opt); 228 bb_error_msg_and_die("unknown user %s", user_opt);
229 change_identity(pw); /* initgroups, setgid, setuid */ 229 change_identity(pw); /* initgroups, setgid, setuid */
230 } 230 }
231 } 231 }