summaryrefslogtreecommitdiff
path: root/usr.bin/sndiod
AgeCommit message (Collapse)Author
2016-01-07Move sndiod man page to section 8.Alexandre Ratchov
suggested by deraadt, fixes from jmc, ok millert
2015-12-25follwing -> followingAnthony J. Bentley
2015-12-25Don't set (unused) IPV6_V6ONLY option.Alexandre Ratchov
suggested by deraadt
2015-12-23Add pledge calls to both "helper" and "worker" processes.Alexandre Ratchov
ok deraadt, semarie
2015-12-23fix false-positive "uninitialized" gcc warningAlexandre Ratchov
2015-12-23Call getpwname() earlier, and if it fails, return the properAlexandre Ratchov
exit code, so that the failure gets reported by /etc/rc.
2015-12-23hide forgotten debug printfsAlexandre Ratchov
2015-12-21Don't attempt to remove unix socket as it's owned by root andAlexandre Ratchov
we've already dropped root privileges.
2015-12-20In case of a bug in sndiod, an attacker (a local user) could runAlexandre Ratchov
arbitrary code as user _sndio, i.e. get a second uid. Mitigate the risk by implementing initial privilege separation as follows. Break sndiod in two processes: a chroot()ed "worker" process processing input, and a non-chroot()ed "helper" process opening devices and passing descriptors to the worker. With help from benno, claudio, semarie and gilles. ok benno, semarie and tb
2015-12-14Work on a copy of the slowaccept flag instead of the global one asAlexandre Ratchov
it could change somewhere in the poll() loop.
2015-12-07reset the slowaccept flag in sock_close()Alexandre Ratchov
2015-11-26Cleanup in the opposite order as initialization, inline privdrop()Alexandre Ratchov
function. No behaviour change.
2015-11-25fix latest: don't set d->path as we just allocated itAlexandre Ratchov
2015-11-25Allocate device names in the heap, so they can be generated.Alexandre Ratchov
2015-11-25spacingAlexandre Ratchov
2015-11-24remove unused test when handling of -U optionAlexandre Ratchov
2015-11-23define port_log even without -DDEBUGAlexandre Ratchov
2015-11-23Remove unused -M option (2+ years get used to it is enough)Alexandre Ratchov
2015-11-23If the clock is ticking because of a MMC start message, then stopAlexandre Ratchov
it on exit. This avoids holding an extra ref to the device, in turn preventing sndiod from exitting cleanly.
2015-11-23Save and restore umask when creating /tmp/aucat/ to ensure theAlexandre Ratchov
directory gets the right permissions, as we do in other places.
2015-11-23use device numbers stored in the dev structure rather thanAlexandre Ratchov
assuming dev_list is ordered
2015-11-23Insert new ports at the head of the list and stop assuming itsAlexandre Ratchov
ordered.
2015-11-22Disallow multiple -L options and remove the constraint -U toAlexandre Ratchov
be used before -L. No behaviour change as -L is still disabled.
2015-11-22save port number if port structureAlexandre Ratchov
2015-11-18missing word; from jan staryJason McIntyre
2015-11-18disable networking (i.e. -L option) until privilege separation isAlexandre Ratchov
implemented
2015-11-18say that network communication is not secureAlexandre Ratchov
2015-10-02Replace %s in the format string, with its value (macro).Alexandre Ratchov
2015-10-02As the socket path is known, use its size rather that PATH_MAX.Alexandre Ratchov
2015-10-02use macros instead of hard-coded strings for unix sockets pathsAlexandre Ratchov
2015-09-05In the last commit, the man-page change was committed by mistake,Alexandre Ratchov
backit out.
2015-09-05typos in comments: xfree -> freeAlexandre Ratchov
2015-08-27backout previous for now, as it causes me portability problemsAlexandre Ratchov
2015-08-11Use INTIM instead of -1 as poll(2) time-out argument.Alexandre Ratchov
Suggested by deraadt.
2015-08-11Don't call poll(2) with few millisecond time-out argument when -1Alexandre Ratchov
could be used. Avoids syscalls when the daemon is not being used. Requested by deraadt.
2015-08-01Move processing of polled files in its own function, and call itAlexandre Ratchov
twice: once for files that need immediate handling, and once for files that would block. No behavior change.
2015-07-24Crank watchdog timeout from 2 to 4 seconds.Alexandre Ratchov
2015-07-24Log when device is disconnected.Alexandre Ratchov
2015-07-24Clear watchdog timer when device is closed, fixes use-after-free inAlexandre Ratchov
error code-paths when device is closed before audio is stopped.
2015-07-17Use an offsets in the array of pollfd structures instead of pointers. NoAlexandre Ratchov
behaviour change.
2015-07-17rename nfds to max_nfds, no object changeAlexandre Ratchov
2015-07-17Move non-debug varibles outside #ifdef DEBUG blockAlexandre Ratchov
2015-07-17Simplify debug info: log poll descriptors on a single line, recordAlexandre Ratchov
timestamps only when they are needed.
2015-07-17Stop using interval timers (not inherited by fork(2), obsolete inAlexandre Ratchov
newer posix releases), use the poll(2) timeout parameter instead. Fixes hangs during clean-up after the audio device is disconnected or an unrecoverable error is detected. Suggested by and discussed with millert@.
2015-04-26Fix typo in the buffer size value: 7680 in the manpage vs 7860 inDavid Coppa
the sndiod.c code. Initially, I thought the error was in the manpage, but Alexander told me it was the code, so fix the code instead. ok ratchov@
2015-02-16Check if slot is NULL, and if so, drop the connection. For now slotAlexandre Ratchov
is never NULL, but this is an accident.
2015-02-16add missing protos, fix spacingAlexandre Ratchov
2015-02-16Allow files to be skipped in the poll(2) event loop, in caseAlexandre Ratchov
there are events already available (for immediate processing)
2015-02-16Use signed integers as offset in the buffer (as aucat does) toAlexandre Ratchov
avoid other signed integer being accidently promoted to unsigned in future code.
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)