aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* sandbox: drop beep supportMike Frysinger2012-06-232-15/+1
| | | | | | | | Almost no one has beep support turned on anymore, and ebeep in the main tree has been deprecated (meaning it wasn't found useful while building packages). So punt support for it from sandbox too. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libsandbox: push down constructor initMike Frysinger2012-03-051-0/+1
| | | | | | | | | | | | | | Since every consumer of sb_open gets a copy of the sbio_open data, push the init of this into the .data section of the respective consumers to avoid the runtime overhead. This just leaves sandbox_lib setup in the constructor function, but that is only needed by the execve wrapper, so push down init of that to the existing sb_init logic which happens before our execve wrapper gets used. URL: http://bugs.gentoo.org/404013 Reported-by: Mike Gilbert <floppym@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: dont warn about inherited ignored signalsMike Frysinger2009-10-281-4/+4
| | | | | | | | | Inheriting signals are normal/fine, so don't warn about those since they aren't a problem. URL: http://bugs.gentoo.org/285341 Reported-by: Paul Varner <fuzzyray@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libsbutil: kill off unnecessary log_domain codeMike Frysinger2009-08-251-3/+0
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* drop force pic flagsMike Frysinger2009-08-251-2/+1
| | | | | | | The autotool build system already adds PIC where needed, so don't force our own -D/-f options. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* add -Wall to automake runs and fix falloutMike Frysinger2009-08-251-5/+3
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* setup local sandbox.d for running tests to avoid /etc/sandbox.dMike Frysinger2009-04-261-1/+2
| | | | | | | Always use local sandbox.d copy to avoid random /etc/sandbox.d issues like it doesn't exist, or has permission problems, or anything else. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* libsandbox: enable tracing for multiple personalitiesMike Frysinger2009-04-051-0/+4
| | | | | | | | | Initial support for tracing non-default personalities. For example, tracing a 32bit binary from a 64bit environment. URL: http://bugs.gentoo.org/264399 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Patrick Lauer <patrick@gentoo.org>
* sandbox: stop denying /etc/ld.so.preloadMike Frysinger2009-03-311-2/+0
| | | | | | | | The very old method of loading sandbox was via ld.so.preload, so it was added to default deny list. However, that's long dead, and since it does not conflict with LD_PRELOAD, no point in preventing access. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: don't put duplicate sandbox.so into LD_PRELOADv1.6Mike Frysinger2009-03-121-11/+15
| | | | | | | | | If launching another sandbox instance, don't blindly append LD_PRELOAD with the sandbox lib. URL: http://bugs.gentoo.org/216942 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Brian Harring <ferringb@gmail.com>
* sandbox: pass shell exit status upMike Frysinger2009-03-121-13/+11
| | | | | | | If the command sandbox was instructed to execute failed, make sure we pass that exact exit status back up instead of normalizing everything to 0/1. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: delete the testing var after installv1.4Mike Frysinger2009-03-082-1/+9
| | | | | | | We don't want people to bypass normal mechanisms with the testing var, so zero out the name when installing the sandbox binary. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: do not dist sandbox.sh and clean up error messagesMike Frysinger2009-02-122-6/+6
| | | | | | | | | | | The sandbox.sh file is generated now, so do not mark it as a dist target. To make this kind of error easier to figure out in the future, have all sandbox errors related to files include the full filename that is causing an error. URL: http://bugs.gentoo.org/258690 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Alexis Ballier <aballier@gentoo.org>
* sandbox: check signal returns and allow SIGHUP to be ignoredMike Frysinger2009-02-121-5/+16
| | | | | | | | | | | If the SIGHUP signal is already set to SIG_IGN, then do not replace it with our own handler as most likely this means the user is using `nohup`. As for the other signals, check the return value and warn if something weird happens (like they aren't all set to SIG_DFL). URL: http://bugs.gentoo.org/217898 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Ken Bloom <kbloom@gmail.com>
* tests: get scripts working in sandbox.shMike Frysinger2009-02-083-5/+17
| | | | | | | | | Make sure we source the local sandbox.{bashrc,conf} and we always make the helper functions available when testing even if we aren't interactive. Now we can run `make check` and test the local version of sandbox even when we are running under another sandbox env. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: fix typo in struct sandbox_info_t declMike Frysinger2009-02-071-1/+1
| | | | | | | | | | | A "typedef" was missing when declaring the sandbox_info_t struct resulting in a large unused "sandbox_info_t" object showing up everywhere. Normally this isn't a problem (other than resource waste), but some systems don't like multiply defined objects even if they're in the .bss section. URL: http://bugs.gentoo.org/258031 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Timo Kamph <timo@kamph.org>
* sandbox: new sb_{p,}err() helper functionsMike Frysinger2009-02-022-16/+12
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: fixup a few more NULL memory checksMike Frysinger2009-02-021-5/+4
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox/libsbutil: remove more useless error checks and var initsMike Frysinger2009-02-012-21/+7
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: convert remaining perror to sb_pwarnMike Frysinger2009-02-013-4/+4
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: unify/standardize message output functionsMike Frysinger2009-02-011-54/+41
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: remove unused /var/tmp dir handlingMike Frysinger2009-02-012-8/+0
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: declare all local funcs staticMike Frysinger2009-02-011-5/+5
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: simplify print_sandbox_log() functionMike Frysinger2009-02-011-37/+23
| | | | | | | Avoid memory management issues and read/write the log file directly to stderr. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: use $(LIBDL) rather than -ldlMike Frysinger2009-01-281-1/+1
| | | | | | URL: http://bugs.gentoo.org/256741 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Javier Villavicencio <the_paya@gentoo.org>
* libsbutil: find libsandbox.so in non-standard pathsMike Frysinger2009-01-261-3/+1
| | | | | | | | | | If installing sandbox into a non-standard location (and the library ends up in a non-standard path where the ELF loader does not search), then set the LD_PRELOAD variable to the full path. URL: http://bugs.gentoo.org/254358 Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Jeremy Olexa <darkside@gentoo.org>
* libsbutil: cleanup x* memory functionsMike Frysinger2008-12-312-12/+3
| | | | | | | | Pull the x* memory functions out of rcscripts and into libsbutil and change their style to match the rest of sbutil. Also add xzalloc() and xstrdup(), and convert pointless strndup() usage to strdup(). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* 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>
* src/sandbox.sh: produce it from configureMike Frysinger2008-11-281-1/+1
| | | | | | | Rather than mucking with paths dynamically, just get the absolute top builddir from configure. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* tests: fixup running test out of src treeMike Frysinger2008-11-161-1/+1
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* tests: move libsigsegv disable to configure.acMike Frysinger2008-11-161-1/+5
| | | | 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: add a script to quickly test locally built libsandboxMike Frysinger2008-11-162-0/+7
| | | | 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>
* move build flags to configure rather than MakefileMike Frysinger2008-11-111-4/+4
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* sandbox: convert to stdboolMike Frysinger2008-11-102-6/+6
| | | | 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-092-18/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* cleanup whitespace and comments -- no functional changesMike Frysinger2008-11-093-66/+16
| | | | 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>
* src/sandbox.h: add missing headerMike Frysinger2006-09-031-0/+45
| | | | 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-133-353/+395
| | | | 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>