Package: compartment
Version: 1.1.0-4
Severity: wishlist
Tags: patch
I've added an option to allow core dumps. Useful for debugging (in my
case a segfault in the program I was launching)
Disabled by default, giving current behaviour.
PATCH
d65 1
a65 1
int do_chroot, do_group, do_user, do_caps, do_init, verbose, quiet,
allow_core;
d77 1
a77 1
fprintf(stderr, "Options:\n\t --chroot path\t chroot to path\n\t --user
user\t change uid to this user\n\t --group group\t change gid to this
group\n\t --init
program\t execute this program/script before doing anything\n\t --cap
capset\t set capset name. This option can be used several times.\n\t
--verbose\t be verbose\n\t
--quiet\t do no logging (to syslog)\n\t --allow-core\t allow core
dumps\n\t --fork\t\t fork (if everything is fine)\n\nHints: always try
to chroot; use --user&group if
possible; chroot and chown all\nfiles to another user than root if you
use capabilties. Read the README file!\n\nKnown capset names: none");
d249 3
a251 2
if (strcmp(argv[program_params], "--allow-core") == 0) {
allow_core = 1;
d253 2
a254 3
if (strcmp(argv[program_params], "--verbose") == 0) {
print_msg("I am in verbose mode now\n");
verbose = 1;
d256 2
a257 2
if (strcmp(argv[program_params], "--quiet") == 0) {
quiet = 1;
d259 4
a262 7
if (strcmp(argv[program_params], "--help") == 0) {
help();
} else {
print_msg("Unknown parameter: %s\n\n",argv[program_params]);
help();
}
}}}}}}}}}
d354 1
a354 1
for (fd = 3; fd <= 1023; fd++) // set close_on_exec on all open fd�s > 2
d359 4
a362 6
if(allow_core==0){
if (setrlimit(RLIMIT_CORE, &limit) < 0)
print_msg("Could not set core size limit to 0 bytes\n");
else if (verbose)
print_msg("core size limit successfully set to 0 bytes\n");
}
-- System Information:
Debian Release: 5.0.1
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.26-2-vserver-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages compartment depends on:
ii libc6 2.7-18 GNU C Library: Shared libraries
compartment recommends no packages.
compartment suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]