- account = *++argv;
- if (!account) bb_show_usage();
- if (!*++argv) bb_show_usage();
- suidgid((char*)account);
- BB_EXECVP(argv[0], argv);
- bb_perror_msg_and_die("exec %s", argv[0]);
-}
-
-static void envuidgid(int argc UNUSED_PARAM, char **argv)
-{
- const char *account;
-
- account = *++argv;
- if (!account) bb_show_usage();
- if (!*++argv) bb_show_usage();
- euidgid((char*)account);
- BB_EXECVP(argv[0], argv);
- bb_perror_msg_and_die("exec %s", argv[0]);
-}
-
-static void envdir(int argc UNUSED_PARAM, char **argv)
-{
- const char *dir;
-
- dir = *++argv;
- if (!dir) bb_show_usage();
- if (!*++argv) bb_show_usage();
- edir(dir);
- BB_EXECVP(argv[0], argv);
- bb_perror_msg_and_die("exec %s", argv[0]);
-}
-
-static void softlimit(int argc UNUSED_PARAM, char **argv)
-{
- char *a,*c,*d,*f,*l,*m,*o,*p,*r,*s,*t;
- getopt32(argv, "+a:c:d:f:l:m:o:p:r:s:t:",
- &a,&c,&d,&f,&l,&m,&o,&p,&r,&s,&t);
- if (option_mask32 & 0x001) limita = xatoul(a); // -a
- if (option_mask32 & 0x002) limitc = xatoul(c); // -c
- if (option_mask32 & 0x004) limitd = xatoul(d); // -d
- if (option_mask32 & 0x008) limitf = xatoul(f); // -f
- if (option_mask32 & 0x010) limitl = xatoul(l); // -l
- if (option_mask32 & 0x020) limits = limitl = limita = limitd = xatoul(m); // -m
- if (option_mask32 & 0x040) limito = xatoul(o); // -o
- if (option_mask32 & 0x080) limitp = xatoul(p); // -p
- if (option_mask32 & 0x100) limitr = xatoul(r); // -r
- if (option_mask32 & 0x200) limits = xatoul(s); // -s
- if (option_mask32 & 0x400) limitt = xatoul(t); // -t
- argv += optind;
- if (!argv[0]) bb_show_usage();
- slimit();