aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* sandbox: include full libc path in version outputMike Frysinger2008-11-291-1/+1
| | | | | | | Include the full libc path (LIBC_PATH) in the sandbox --version output as this is very useful debug information. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: make -h/--help/-V/--version print out something usefulMike Frysinger2008-11-161-0/+36
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: display when a process exits due to a signalEd Catmur2008-11-161-5/+11
| | | | | | URL: http://bugs.gentoo.org/194943 Signed-off-by: Ed Catmur <ed@catmur.co.uk> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* unify SB_E{INFO,WARN,ERROR} functions and have them call the internal ↵Mike Frysinger2008-11-161-6/+4
| | | | | | sb_printf function Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: convert to stdboolMike Frysinger2008-11-101-3/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: remove remaining multilib codeMike Frysinger2008-11-091-6/+0
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: unify banner message and drop "linux" from itMike Frysinger2008-11-091-2/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* headers.h: consolidate all random system includes into one fileMike Frysinger2008-11-091-11/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* cleanup whitespace and comments -- no functional changesMike Frysinger2008-11-091-25/+8
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: drop pointless castMike Frysinger2008-11-091-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: properly use the return value of xreallocDavid Leverton2008-11-081-0/+1
| | | | | | URL: http://bugs.gentoo.org/238231 Signed-off-by: David Leverton <levertond@googlemail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Punt vim indentation line.Martin Schlemmer2006-07-131-1/+0
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Punt old copyright stuff, as nearly everything was rewrited. If something ↵Martin Schlemmer2006-07-131-16/+27
| | | | | | is was not and is pointed out, I will rectify it. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Split out environment related functions, and make their naming a bit more sane.Martin Schlemmer2006-07-131-352/+9
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Update for librcutil dynbuf function name changes.Martin Schlemmer2006-07-121-16/+16
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Check log size before we open it.Martin Schlemmer2006-07-111-3/+4
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Use IO related sb_*() functions, and improve error checking.Martin Schlemmer2006-07-111-5/+13
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Remove file_length(), and rather use rc_get_size().Martin Schlemmer2006-07-091-2/+2
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* As we are using a symbol map for libsandbox, its no longer neededMartin Schlemmer2006-07-091-2/+1
| | | | | | | | | to have all the internal functions static, and thus we can break things out a bit and make the source layout more sane. Start by moving librcutil to libsbutil, and adding all the defines and helper functions needed by both libsandbox and sandbox. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Update comment.Martin Schlemmer2006-07-091-1/+1
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Free child argv we allocated earlier, as at execve() duplicatesMartin Schlemmer2006-07-081-2/+6
| | | | | | | this, so no need to keep it around and waiste more memory. Make sure we will not in future free them twice. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Free child environ we allocated earlier, as at execve() duplicatesMartin Schlemmer2006-07-081-4/+9
| | | | | | this, so no need to keep it around and waiste more memory. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Remove debug printf() that I missed to remove.Martin Schlemmer2006-07-081-1/+0
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Convert all string list operations to use the str_list_*() macro's.Martin Schlemmer2006-07-081-94/+64
| | | | | | | | This allow a nice cleanup of the bash argv stuff, and also actually add error handling to that part of the code. Some more cleanup of the environ stuff. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Set 'env_ptr = environ;' _after_ we unset and set variables, else theMartin Schlemmer2006-07-081-22/+27
| | | | | | | block could have been reallocated, and leave us using the wrong pointer. General cleanup of the env handling code. Free all memory used. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Fix double free() in sandbox.Martin Schlemmer2006-07-081-3/+0
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Remove uneeded test, as setenv(,,0) do not replace.Martin Schlemmer2006-07-061-6/+4
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Use debug versions of malloc(), realloc() and calloc().Martin Schlemmer2006-07-061-6/+6
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Free some of our custom environment data.Martin Schlemmer2006-07-061-5/+13
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Set default values via a config file. Also support sandbox.dMartin Schlemmer2006-07-061-73/+191
| | | | | | config directory for package specific configuration files. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Remove last libsandbox-only functions in favour for ones providedMartin Schlemmer2006-07-061-0/+4
| | | | | | by librcutil. Setup log_domain properly for debugging. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Updates for changes to librcutil.Martin Schlemmer2006-07-061-7/+7
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Use librcutil.Martin Schlemmer2006-07-051-8/+9
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Rename EINFO, etc to SB_EINFO, etc to not conflict with macros fromMartin Schlemmer2006-07-051-3/+3
| | | | | | librcutil. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Set NOCOLOR to 'no', else ebuild.sh do not set COLS, etc.Martin Schlemmer2006-07-051-1/+1
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Just killing the child with SANDBOX_ABORT do not actually abort the make processMartin Schlemmer2006-07-051-4/+27
| | | | | | | | | | in many cases. So also kill the offending child, and pray that make will also abort. This is really hackish, and we should rather kill the whole process tree, but currently its too much work (considering that we are in signal context which probably will make things difficult - not even talking about the bsd's ...), so it will have to do. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Make stop_called volatile as its used in signal handler.Martin Schlemmer2006-07-051-2/+2
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Add /dev/full to write allowed paths, bug #137240.Martin Schlemmer2006-07-051-1/+1
| | | | | | URL: http://bugs.gentoo.org/137240 Signed-off-by: Martin Schlemmer <azarah@gentoo.org> Reported-by: Sascha Biberhofer <karasu@inode.at>
* Add SANDBOX_INTRACTV logic, and Vapier's sandboxshell mojo.Martin Schlemmer2006-07-041-2/+5
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Add is_env_off(). Also check for true/false. Use is_env_*.Martin Schlemmer2006-07-041-1/+8
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Theoretically add support to terminate immediately if we had an access ↵Martin Schlemmer2006-07-041-5/+17
| | | | | | | | | | violation, bug #138499. Uses environment variable SANDBOX_ABORT. URL: http://bugs.gentoo.org/138499 Signed-off-by: Martin Schlemmer <azarah@gentoo.org> Reported-by: Ed Catmur <ed@catmur.co.uk>
* More changes to try and resolve OSes with generic getcwd() implementations.Martin Schlemmer2005-12-051-1/+1
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Rename sandbox_futils.c to sandbox_utils.c. Add gstrndup() and gbasename()Martin Schlemmer2005-12-051-1/+3
| | | | | | | to sandbox_utils.c. Add check for glibc, and fixup things to not need glibc only extensions if not needed for versioned symbols. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Add /dev/shm to write path.Martin Schlemmer2005-12-021-1/+1
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Use egetcwd() in sandbox.c.Martin Schlemmer2005-12-011-1/+1
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Fixup SANDBOX_ON handling after already running changes.Martin Schlemmer2005-12-011-6/+2
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Only check SANDBOX_ACTIVE, and not its value. More BASH_ENV fixes.Martin Schlemmer2005-11-301-2/+1
| | | | Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Revert 64bit arch test, as we should build the 32bit version without fullMartin Schlemmer2005-11-281-1/+1
| | | | | | path checking as well, and add --enable-multilib switch to configure. Signed-off-by: Martin Schlemmer <azarah@gentoo.org>
* Reorder source layout.Martin Schlemmer2005-11-281-0/+561
Signed-off-by: Martin Schlemmer <azarah@gentoo.org>