Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

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  
    5757        -v,--verbose            Verbose
    5858*/
     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
    5987
    6088//usage:#define start_stop_daemon_trivial_usage
     
    126154#define WANT_PIDFILE 1
    127155#include "libbb.h"
     156#include "common_bufsiz.h"
    128157
    129158struct pid_list {
     
    164193    smallint signal_nr;
    165194} FIX_ALIASING;
    166 #define G (*(struct globals*)&bb_common_bufsiz1)
     195#define G (*(struct globals*)bb_common_bufsiz1)
    167196#define userspec          (G.userspec            )
    168197#define cmdname           (G.cmdname             )
     
    172201#define signal_nr         (G.signal_nr           )
    173202#define INIT_G() do { \
     203    setup_common_bufsiz(); \
    174204    user_id = -1; \
    175205    signal_nr = 15; \
     
    512542    }
    513543    if (opt & OPT_c) {
    514         struct bb_uidgid_t ugid = { -1, -1 };
     544        struct bb_uidgid_t ugid;
    515545        parse_chown_usergroup_or_die(&ugid, chuid);
    516         if (ugid.uid != (uid_t) -1) {
     546        if (ugid.uid != (uid_t) -1L) {
    517547            struct passwd *pw = xgetpwuid(ugid.uid);
    518             if (ugid.gid != (gid_t) -1)
     548            if (ugid.gid != (gid_t) -1L)
    519549                pw->pw_gid = ugid.gid;
    520550            /* initgroups, setgid, setuid: */
    521551            change_identity(pw);
    522         } else if (ugid.gid != (gid_t) -1) {
     552        } else if (ugid.gid != (gid_t) -1L) {
    523553            xsetgid(ugid.gid);
    524554            setgroups(1, &ugid.gid);
Note: See TracChangeset for help on using the changeset viewer.