diff options
Diffstat (limited to 'runit/chpst.c')
-rw-r--r-- | runit/chpst.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/runit/chpst.c b/runit/chpst.c index 3a2f9e616..3ecb85cba 100644 --- a/runit/chpst.c +++ b/runit/chpst.c | |||
@@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are met: | |||
13 | 3. The name of the author may not be used to endorse or promote products | 13 | 3. The name of the author may not be used to endorse or promote products |
14 | derived from this software without specific prior written permission. | 14 | derived from this software without specific prior written permission. |
15 | 15 | ||
16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED | 16 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED |
17 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | 17 | WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
18 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO | 18 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO |
19 | EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 19 | EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
@@ -59,12 +59,12 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |||
59 | //config: help | 59 | //config: help |
60 | //config: Sets soft resource limits as specified by options | 60 | //config: Sets soft resource limits as specified by options |
61 | 61 | ||
62 | //applet:IF_CHPST(APPLET(chpst, BB_DIR_USR_BIN, BB_SUID_DROP)) | 62 | //applet:IF_CHPST( APPLET_NOEXEC(chpst, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, chpst)) |
63 | // APPLET_ODDNAME:name main location suid_type help | 63 | // APPLET_NOEXEC:name main location suid_type help |
64 | //applet:IF_ENVDIR( APPLET_ODDNAME(envdir, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envdir)) | 64 | //applet:IF_ENVDIR( APPLET_NOEXEC(envdir, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envdir)) |
65 | //applet:IF_ENVUIDGID(APPLET_ODDNAME(envuidgid, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envuidgid)) | 65 | //applet:IF_ENVUIDGID(APPLET_NOEXEC(envuidgid, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, envuidgid)) |
66 | //applet:IF_SETUIDGID(APPLET_ODDNAME(setuidgid, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, setuidgid)) | 66 | //applet:IF_SETUIDGID(APPLET_NOEXEC(setuidgid, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, setuidgid)) |
67 | //applet:IF_SOFTLIMIT(APPLET_ODDNAME(softlimit, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, softlimit)) | 67 | //applet:IF_SOFTLIMIT(APPLET_NOEXEC(softlimit, chpst, BB_DIR_USR_BIN, BB_SUID_DROP, softlimit)) |
68 | 68 | ||
69 | //kbuild:lib-$(CONFIG_CHPST) += chpst.o | 69 | //kbuild:lib-$(CONFIG_CHPST) += chpst.o |
70 | //kbuild:lib-$(CONFIG_ENVDIR) += chpst.o | 70 | //kbuild:lib-$(CONFIG_ENVDIR) += chpst.o |
@@ -301,9 +301,10 @@ int chpst_main(int argc UNUSED_PARAM, char **argv) | |||
301 | // FIXME: can we live with int-sized limits? | 301 | // FIXME: can we live with int-sized limits? |
302 | // can we live with 40000 days? | 302 | // can we live with 40000 days? |
303 | // if yes -> getopt converts strings to numbers for us | 303 | // if yes -> getopt converts strings to numbers for us |
304 | opt_complementary = "-1"; | 304 | opt = getopt32(argv, "^+" |
305 | opt = getopt32(argv, "+a:+c:+d:+f:+l:+m:+o:+p:+r:+s:+t:+u:U:e:" | 305 | "a:+c:+d:+f:+l:+m:+o:+p:+r:+s:+t:+u:U:e:" |
306 | IF_CHPST("/:n:vP012"), | 306 | IF_CHPST("/:n:vP012") |
307 | "\0" "-1", | ||
307 | &limita, &limitc, &limitd, &limitf, &limitl, | 308 | &limita, &limitc, &limitd, &limitf, &limitl, |
308 | &limitm, &limito, &limitp, &limitr, &limits, &limitt, | 309 | &limitm, &limito, &limitp, &limitr, &limits, &limitt, |
309 | &set_user, &set_user, &env_dir | 310 | &set_user, &set_user, &env_dir |