Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/debianutils/start_stop_daemon.c
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/debianutils/start_stop_daemon.c
r3232 r3621 57 57 -v,--verbose Verbose 58 58 */ 59 //config:config START_STOP_DAEMON 60 //config: bool "start-stop-daemon" 61 //config: default y 62 //config: help 63 //config: start-stop-daemon is used to control the creation and 64 //config: termination of system-level processes, usually the ones 65 //config: started during the startup of the system. 66 //config: 67 //config:config FEATURE_START_STOP_DAEMON_FANCY 68 //config: bool "Support additional arguments" 69 //config: default y 70 //config: depends on START_STOP_DAEMON 71 //config: help 72 //config: Support additional arguments. 73 //config: -o|--oknodo ignored since we exit with 0 anyway 74 //config: -v|--verbose 75 //config: -N|--nicelevel N 76 //config: 77 //config:config FEATURE_START_STOP_DAEMON_LONG_OPTIONS 78 //config: bool "Enable long options" 79 //config: default y 80 //config: depends on START_STOP_DAEMON && LONG_OPTS 81 //config: help 82 //config: Support long options for the start-stop-daemon applet. 83 84 //applet:IF_START_STOP_DAEMON(APPLET_ODDNAME(start-stop-daemon, start_stop_daemon, BB_DIR_SBIN, BB_SUID_DROP, start_stop_daemon)) 85 86 //kbuild:lib-$(CONFIG_START_STOP_DAEMON) += start_stop_daemon.o 59 87 60 88 //usage:#define start_stop_daemon_trivial_usage … … 126 154 #define WANT_PIDFILE 1 127 155 #include "libbb.h" 156 #include "common_bufsiz.h" 128 157 129 158 struct pid_list { … … 164 193 smallint signal_nr; 165 194 } FIX_ALIASING; 166 #define G (*(struct globals*) &bb_common_bufsiz1)195 #define G (*(struct globals*)bb_common_bufsiz1) 167 196 #define userspec (G.userspec ) 168 197 #define cmdname (G.cmdname ) … … 172 201 #define signal_nr (G.signal_nr ) 173 202 #define INIT_G() do { \ 203 setup_common_bufsiz(); \ 174 204 user_id = -1; \ 175 205 signal_nr = 15; \ … … 512 542 } 513 543 if (opt & OPT_c) { 514 struct bb_uidgid_t ugid = { -1, -1 };544 struct bb_uidgid_t ugid; 515 545 parse_chown_usergroup_or_die(&ugid, chuid); 516 if (ugid.uid != (uid_t) -1 ) {546 if (ugid.uid != (uid_t) -1L) { 517 547 struct passwd *pw = xgetpwuid(ugid.uid); 518 if (ugid.gid != (gid_t) -1 )548 if (ugid.gid != (gid_t) -1L) 519 549 pw->pw_gid = ugid.gid; 520 550 /* initgroups, setgid, setuid: */ 521 551 change_identity(pw); 522 } else if (ugid.gid != (gid_t) -1 ) {552 } else if (ugid.gid != (gid_t) -1L) { 523 553 xsetgid(ugid.gid); 524 554 setgroups(1, &ugid.gid);
Note:
See TracChangeset
for help on using the changeset viewer.