OpenBSD CVS

CVS log for src/usr.bin/sndiod/listen.c


[BACK] Up to [local] / src / usr.bin / sndiod

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.14 / (download) - annotate - [select for diffs], Thu Jan 23 20:55:01 2020 UTC (4 years, 3 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, HEAD
Changes since 1.13: +1 -2 lines
Diff to previous 1.13 (colored)

Remove unused sys/signal.h include.

Revision 1.13 / (download) - annotate - [select for diffs], Fri Jun 28 13:35:03 2019 UTC (4 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.12: +12 -12 lines
Diff to previous 1.12 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Jan 3 06:51:56 2017 UTC (7 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.11: +7 -8 lines
Diff to previous 1.11 (colored)

Use a goto to factor all calls to close() when listen_in() returns
an error. From Michael W. Bombardieri. Thanks.

Revision 1.11 / (download) - annotate - [select for diffs], Fri Jan 8 16:22:09 2016 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.10: +0 -15 lines
Diff to previous 1.10 (colored)

Fix changes that last commit undid by mistake, sorry.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Jan 8 16:17:31 2016 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.9: +5 -5 lines
Diff to previous 1.9 (colored)

Make code fit in 80 columns, remove trailing spaces & tabs.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jan 8 13:28:08 2016 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.8: +0 -1 lines
Diff to previous 1.8 (colored)

don't call unlink() to delete socket as this would require cpath

Revision 1.8 / (download) - annotate - [select for diffs], Fri Jan 8 13:14:11 2016 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.7: +47 -28 lines
Diff to previous 1.7 (colored)

Make listen_new_xxx() routines return NULL on failure and check the
returned value wheneverer they are called.

Revision 1.7 / (download) - annotate - [select for diffs], Fri Dec 25 17:16:43 2015 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.6: +0 -14 lines
Diff to previous 1.6 (colored)

Don't set (unused) IPV6_V6ONLY option.

suggested by deraadt

Revision 1.6 / (download) - annotate - [select for diffs], Mon Dec 21 22:03:47 2015 UTC (8 years, 4 months ago) by ratchov
Branch: MAIN
Changes since 1.5: +1 -3 lines
Diff to previous 1.5 (colored)

Don't attempt to remove unix socket as it's owned by root and
we've already dropped root privileges.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Dec 20 11:38:33 2015 UTC (8 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.4: +1 -3 lines
Diff to previous 1.4 (colored)

In case of a bug in sndiod, an attacker (a local user) could run
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

Revision 1.4 / (download) - annotate - [select for diffs], Mon Dec 14 17:44:29 2015 UTC (8 years, 5 months ago) by ratchov
Branch: MAIN
Changes since 1.3: +7 -2 lines
Diff to previous 1.3 (colored)

Work on a copy of the slowaccept flag instead of the global one as
it could change somewhere in the poll() loop.

Revision 1.3 / (download) - annotate - [select for diffs], Wed Nov 18 08:36:20 2015 UTC (8 years, 6 months ago) by ratchov
Branch: MAIN
Changes since 1.2: +3 -1 lines
Diff to previous 1.2 (colored)

disable networking (i.e. -L option) until privilege separation is
implemented

Revision 1.2 / (download) - annotate - [select for diffs], Wed Mar 13 08:28:33 2013 UTC (11 years, 2 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8, OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6, OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

don't display warnings if accept() returns ECONNABORTED or
EWOULDBLOCK, as we do in other daemons

Revision 1.1 / (download) - annotate - [select for diffs], Fri Nov 23 07:03:28 2012 UTC (11 years, 5 months ago) by ratchov
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3

Remplace aucat server by a new sndiod daemon aimed to be simpler
smaller and faster than aucat. It's a drop in replacement with the
following exceptions that don't affect the default setup:
  - The sample rate and the encoding are a per-device parameters
    thus -r and -e options must precede the corresponding -f option
  - MIDI thru boxes are dynamically created and no -M option
    is required anymore, so -M was removed.
  - MIDI ports are exposed with a new ``midi/N'' name, rather
    than abusing MIDI thru boxes.
with help from armani@, ok deraadt@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.