For sdpd(8), change default user/group from nobody/nobody to _sdpd/_sdpd
This commit is contained in:
parent
5dbf7fbdf5
commit
c6f8856e3c
@ -1,4 +1,4 @@
|
||||
# $NetBSD: rc.conf,v 1.84 2007/02/20 16:56:10 kiyohara Exp $
|
||||
# $NetBSD: rc.conf,v 1.85 2007/03/18 15:53:54 plunky Exp $
|
||||
#
|
||||
# /etc/defaults/rc.conf --
|
||||
# default configuration of /etc/rc.conf
|
||||
@ -275,7 +275,7 @@ btconfig=NO # Bluetooth controller configuration
|
||||
btdevctl=NO # Bluetooth device configuration
|
||||
bthcid=NO bthcid_flags="" # Bluetooth HCI daemon
|
||||
btuartd=NO # Bluetooth HCI UART daemon
|
||||
sdpd=NO # Service Discovery daemon
|
||||
sdpd=NO sdpd_flags="" # Service Discovery daemon
|
||||
|
||||
# Other daemons.
|
||||
#
|
||||
|
@ -18,6 +18,7 @@ _rwhod:*:19:
|
||||
staff:*:20:root
|
||||
_proxy:*:21:
|
||||
_timedc:*:22:
|
||||
_sdpd:*:23:
|
||||
guest:*:31:root
|
||||
nobody:*:39:
|
||||
utmp:*:45:
|
||||
|
@ -12,5 +12,6 @@ _pflogd:*:18:18::0:0:& pseudo-user:/var/chroot/pflogd:/sbin/nologin
|
||||
_rwhod:*:19:19::0:0:& pseudo-user:/var/rwho:/sbin/nologin
|
||||
_proxy:*:21:21::0:0:Proxy Services:/nonexistent:/sbin/nologin
|
||||
_timedc:*:22:22::0:0:& pseudo-user:/nonexistent:/sbin/nologin
|
||||
_sdpd:*:23:23::0:0:& pseudo-user:/nonexistent:/sbin/nologin
|
||||
uucp:*:66:1::0:0:UNIX-to-UNIX Copy:/nonexistent:/sbin/nologin
|
||||
nobody:*:32767:39::0:0:Unprivileged user:/nonexistent:/sbin/nologin
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: sdpd,v 1.1 2006/06/19 15:44:36 gdamore Exp $
|
||||
# $NetBSD: sdpd,v 1.2 2007/03/18 15:53:54 plunky Exp $
|
||||
#
|
||||
|
||||
# PROVIDE: sdpd
|
||||
@ -14,9 +14,4 @@ rcvar=$name
|
||||
command="/usr/sbin/${name}"
|
||||
|
||||
load_rc_config $name
|
||||
control="${sdpd_control:-/var/run/sdp}"
|
||||
group="${sdpd_groupname:-nobody}"
|
||||
user="${sdpd_username:-nobody}"
|
||||
command_args="-c ${control} -g ${group} -u ${user}"
|
||||
|
||||
run_rc_command "$1"
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: rc.conf.5,v 1.112 2007/02/04 08:19:26 elad Exp $
|
||||
.\" $NetBSD: rc.conf.5,v 1.113 2007/03/18 15:53:54 plunky Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1996 Matthew R. Green
|
||||
.\" Copyright (c) 1997 Curt J. Sampson
|
||||
@ -1210,24 +1210,8 @@ or
|
||||
.Sq NO .
|
||||
Runs the Service Discovery Profile daemon,
|
||||
.Xr sdpd 8 .
|
||||
.It Sy sdpd_control
|
||||
Optional string specifying the path to the
|
||||
.Xr sdpd 8
|
||||
control socket.
|
||||
Defaults to
|
||||
.Pa /var/run/sdp .
|
||||
.It Sy sdpd_username
|
||||
Optional string specifying the username that
|
||||
.Xr sdpd 8
|
||||
will run as after initialisation.
|
||||
Defaults to
|
||||
.Sq nobody .
|
||||
.It Sy sdpd_groupname
|
||||
Optional string specifying the groupname that
|
||||
.Xr sdpd 8
|
||||
will run as after initialisation.
|
||||
Defaults to
|
||||
.Sq nobody .
|
||||
Passes
|
||||
.Sy sdpd_flags .
|
||||
.El
|
||||
.Ss Other daemons
|
||||
.Bl -tag -width net_interfaces
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $NetBSD: postinstall,v 1.37 2007/03/03 06:43:46 apb Exp $
|
||||
# $NetBSD: postinstall,v 1.38 2007/03/18 15:53:55 plunky Exp $
|
||||
#
|
||||
# Copyright (c) 2002-2006 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
@ -615,7 +615,7 @@ do_gid()
|
||||
[ -n "$1" ] || err 2 "USAGE: do_gid fix|check"
|
||||
|
||||
check_ids $1 groups "${DEST_DIR}/etc/group" \
|
||||
named ntpd postfix sshd authpf _pflogd _rwhod _timedc
|
||||
named ntpd postfix sshd authpf _pflogd _rwhod _timedc _sdpd
|
||||
}
|
||||
|
||||
#
|
||||
@ -872,6 +872,9 @@ do_rc()
|
||||
ip6forwarding \
|
||||
mountcritlocal mountcritremote \
|
||||
network nfsiod_flags \
|
||||
sdpd sdpd_control \
|
||||
sdpd sdpd_groupname \
|
||||
sdpd sdpd_username \
|
||||
sysctl
|
||||
while [ $# -gt 1 ]; do
|
||||
if rcconf_is_set ${op} $1 $2 1; then
|
||||
@ -1091,7 +1094,7 @@ do_uid()
|
||||
[ -n "$1" ] || err 2 "USAGE: do_uid fix|check"
|
||||
|
||||
check_ids $1 users "${DEST_DIR}/etc/master.passwd" \
|
||||
named ntpd postfix sshd _pflogd _rwhod _timedc
|
||||
named ntpd postfix sshd _pflogd _rwhod _timedc _sdpd
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: main.c,v 1.2 2007/03/18 10:00:42 plunky Exp $ */
|
||||
/* $NetBSD: main.c,v 1.3 2007/03/18 15:53:55 plunky Exp $ */
|
||||
|
||||
/*
|
||||
* main.c
|
||||
@ -27,7 +27,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: main.c,v 1.2 2007/03/18 10:00:42 plunky Exp $
|
||||
* $Id: main.c,v 1.3 2007/03/18 15:53:55 plunky Exp $
|
||||
* $FreeBSD: src/usr.sbin/bluetooth/sdpd/main.c,v 1.1 2004/01/20 20:48:26 emax Exp $
|
||||
*/
|
||||
|
||||
@ -35,7 +35,7 @@
|
||||
__COPYRIGHT("@(#) Copyright (c) 2006 Itronix, Inc.\n"
|
||||
"@(#) Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com>\n"
|
||||
"All rights reserved.\n");
|
||||
__RCSID("$NetBSD: main.c,v 1.2 2007/03/18 10:00:42 plunky Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.3 2007/03/18 15:53:55 plunky Exp $");
|
||||
|
||||
#include <sys/select.h>
|
||||
#include <bluetooth.h>
|
||||
@ -74,7 +74,7 @@ main(int argc, char *argv[])
|
||||
{
|
||||
server_t server;
|
||||
char const *control = SDP_LOCAL_PATH;
|
||||
char const *user = "nobody", *group = "nobody";
|
||||
char const *user = "_sdpd", *group = "_sdpd";
|
||||
char const *sgroup = NULL;
|
||||
int32_t detach = 1, opt;
|
||||
struct sigaction sa;
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: sdpd.8,v 1.2 2007/03/18 10:00:42 plunky Exp $
|
||||
.\" $NetBSD: sdpd.8,v 1.3 2007/03/18 15:53:55 plunky Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin@yahoo.com>
|
||||
.\" All rights reserved.
|
||||
@ -24,7 +24,7 @@
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.\" $Id: sdpd.8,v 1.2 2007/03/18 10:00:42 plunky Exp $
|
||||
.\" $Id: sdpd.8,v 1.3 2007/03/18 15:53:55 plunky Exp $
|
||||
.\" $FreeBSD: src/usr.sbin/bluetooth/sdpd/sdpd.8,v 1.5 2005/12/06 17:56:36 emax Exp $
|
||||
.\"
|
||||
.Dd January 13, 2004
|
||||
@ -93,7 +93,7 @@ This only works if
|
||||
.Nm
|
||||
was started as root.
|
||||
The default group name is
|
||||
.Dq Li nobody .
|
||||
.Dq Li _sdpd .
|
||||
.It Fl h
|
||||
Display usage message and exit.
|
||||
.It Fl u Ar user
|
||||
@ -105,7 +105,7 @@ This only works if
|
||||
.Nm
|
||||
was started as root.
|
||||
The default user name is
|
||||
.Dq Li nobody .
|
||||
.Dq Li _sdpd .
|
||||
.El
|
||||
.Sh CAVEAT
|
||||
The
|
||||
|
Loading…
Reference in New Issue
Block a user