aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-01-14 19:40:00 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-01-14 19:40:00 +0100
commitc4144ca3a51cf5bfe7dfa5a796ae53e9ae33126c (patch)
treeefa32d529cad7224312aeb08f88a2194b86f5ac3
parent996797855170685eccf0c3d9e56f819e94045938 (diff)
downloadbusybox-c4144ca3a51cf5bfe7dfa5a796ae53e9ae33126c.tar.gz
renice: add comment about getpwnam/NOFORK interaction
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--util-linux/renice.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util-linux/renice.c b/util-linux/renice.c
index 65a80001b..46704591f 100644
--- a/util-linux/renice.c
+++ b/util-linux/renice.c
@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
-
/* Notes:
* Setting an absolute priority was obsoleted in SUSv2 and removed
* in SUSv3. However, the common linux version of renice does
@@ -95,6 +94,7 @@ int renice_main(int argc UNUSED_PARAM, char **argv)
/* Process an ID arg. */
if (which == PRIO_USER) {
struct passwd *p;
+ /* NB: use of getpwnam makes it risky to be NOFORK, switch to getpwnam_r? */
p = getpwnam(arg);
if (!p) {
bb_error_msg("unknown user %s", arg);