aboutsummaryrefslogtreecommitdiff
path: root/lib/xwrap.c
AgeCommit message (Collapse)Author
2014-07-21Improve gid/uid error messages.Rob Landley
2014-06-03mount: start on option parsing, implement loopback and bind mount autodetection.Rob Landley
2014-05-31Introduce xfork() and make commands use it, and make some WEXITSTATUS() use ↵Rob Landley
WIFEXITED() and WTERMSIG()+127.
2014-05-26Isaac Dunham suggested xprintf() should call fflush() instead of ferror(), ↵Rob Landley
and posix-2008 doesn't say if fflush() covers ferror() (or can return success when the stream's error state is set), so call both.
2014-03-29Group headers by standard (POSIX or LSB) or function (internationalization, ↵Rob Landley
networking). Move headers standards ignore (but which have been there >15 years) to lib/portability.h. Fold xregcomp into lib since it's posix.
2014-03-11Move mkpathat to lib, remove redundant function used by patch.Rob Landley
2014-01-16Rename xmsprintf() to just xmprintf().Rob Landley
Partly because there's no supplied target string ala sprintf, and partly because I can never remember what order the m and s go in.
2013-12-27Pass through all the readfile() arguments from xreadfile().Rob Landley
2013-12-23Fix some issues raised (albeit indirectly) by Isaac Dunham.Rob Landley
POLL_IN defined as a constant by some libc. Factor out login.c's change_identity() to xwrap.c as xsetuser(). Replace xsetuid() with xsetuser() Put a space between argument globals and non-argument globals. TT starts zeroed, don't need to re-zero entries in it. STDIN_FILENO has been 0 since 1969, even DOS copied that. Just say 0. Added an xchroot() using xchdir() to lib/xwrap.c. Remove endgrent() call until somebody can explain why it was there.
2013-11-28Add xgetpwnam() to lib/xwrap.c.Rob Landley
2013-11-28Move xgetpwuid() and xgetgrgid() into xwrap.cRob Landley
2013-11-02Give xstrncpy() a more informative error message.Rob Landley
2013-09-06Fix for xpidfile spotted by Felix Janda.Rob Landley
2013-09-03Introduce libbuf analogous to toybuf but for use by lib/*.c. Change ↵Rob Landley
readfile() semantics to be able to read into an existing buffer, or malloc its own if that's NULL.
2013-08-30Add scripts/single.sh to build individual non-multiplexed standalone commands.Rob Landley
Alas, you can't quite do this yet: make defconfig make for i in $(./toybox) do echo $i PREFIX=singles/ scripts/single.sh $i || break done Because the OLDTOY() aliases for commands won't build without the base command. And I can't just skip them because chown/chmod or mv/cp aren't the same thing.
2013-08-26syslogd: cleanupFelix Janda
- fix bugs introduced in the cleanups - inline addrfds() and open_unix_socks() and simplify them - use xpidfile() - remove isNetwork from struct logfile - invert the meaning of facility and level in struct logfile so that they are automatically correctly initialized - fix memory leak regarding the filenames of logfiles - TT.sd was unused
2013-08-07Forgot to check in xfdopen(). My bad.Rob Landley
Failure of fdopen() is most likely failure of malloc() for the FILE structure.
2013-07-19Start of TOYBOX_SINGLE support, for building standalone commands with no ↵Rob Landley
multiplexer.
2013-07-17Add timeout, factoring out common code from sleep.Rob Landley
2013-07-16Split lib/xwrap.c from lib/lib.cRob Landley