summaryrefslogtreecommitdiffstats
path: root/sysutils/system-tools-backends/files
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/system-tools-backends/files')
-rw-r--r--sysutils/system-tools-backends/files/patch-Users_Users.pm47
-rw-r--r--sysutils/system-tools-backends/files/patch-dispatcher_main.c11
-rw-r--r--sysutils/system-tools-backends/files/system-tools-backends.in26
3 files changed, 84 insertions, 0 deletions
diff --git a/sysutils/system-tools-backends/files/patch-Users_Users.pm b/sysutils/system-tools-backends/files/patch-Users_Users.pm
new file mode 100644
index 000000000..5e2598972
--- /dev/null
+++ b/sysutils/system-tools-backends/files/patch-Users_Users.pm
@@ -0,0 +1,47 @@
+--- Users/Users.pm.orig Thu Oct 5 09:27:21 2006
++++ Users/Users.pm Sun Apr 22 23:05:41 2007
+@@ -458,7 +458,7 @@
+
+ if ($Utils::Backend::tool{"system"} eq "FreeBSD")
+ {
+- $command = "$cmd_pw userdel -n \'" . $$user[$LOGIN] . "\' ";
++ $command = "$cmd_pw userdel -n \'" . $$user[$LOGIN] . "\' -r ";
+ }
+ else
+ {
+@@ -538,10 +538,10 @@
+ {
+ my $pwdpipe;
+ my $home;
++ my $user;
+
+- # FreeBSD doesn't create the home directory
+ $home = $$user[$HOME];
+- &Utils::File::run ("$tool_mkdir -p $home");
++ $user = $$user[$LOGIN];
+
+ $command = "$cmd_pw useradd " .
+ " -n \'" . $$user[$LOGIN] . "\'" .
+@@ -549,11 +549,12 @@
+ " -d \'" . $$user[$HOME] . "\'" .
+ " -g \'" . $$user[$GID] . "\'" .
+ " -s \'" . $$user[$SHELL] . "\'" .
+- " -H 0"; # pw(8) reads password from STDIN
++ " -m -h 0"; # pw(8) reads password from STDIN
+
+ $pwdpipe = &Utils::File::run_pipe_write ($command);
+ print $pwdpipe $$user[$PASSWD];
+ &Utils::File::close_file ($pwdpipe);
++ &Utils::File::run ("chown -R $user $home");
+ }
+ elsif ($Utils::Backend::tool{"system"} eq "SunOS")
+ {
+@@ -629,7 +630,7 @@
+ " -d \'" . $$new_user[$HOME] . "\'" .
+ " -g \'" . $$new_user[$GID] . "\'" .
+ " -s \'" . $$new_user[$SHELL] . "\'" .
+- " -H 0"; # pw(8) reads password from STDIN
++ " -h 0"; # pw(8) reads password from STDIN
+
+ $pwdpipe = &Utils::File::run_pipe_write ($command);
+ print $pwdpipe $$new_user[$PASSWD];
diff --git a/sysutils/system-tools-backends/files/patch-dispatcher_main.c b/sysutils/system-tools-backends/files/patch-dispatcher_main.c
new file mode 100644
index 000000000..b575cbfd4
--- /dev/null
+++ b/sysutils/system-tools-backends/files/patch-dispatcher_main.c
@@ -0,0 +1,11 @@
+--- dispatcher/main.c.orig 2007-10-29 20:36:16.890317344 -0400
++++ dispatcher/main.c 2007-10-29 20:37:02.584773483 -0400
+@@ -47,7 +47,7 @@
+
+ setsid ();
+
+- if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CREAT | O_WRONLY)) != -1)
++ if ((pidfile_fd = open (LOCALSTATEDIR "/run/system-tools-backends.pid", O_CREAT | O_WRONLY, 0600)) != -1)
+ {
+ str = g_strdup_printf ("%d", getpid ());
+ write (pidfile_fd, str, strlen (str));
diff --git a/sysutils/system-tools-backends/files/system-tools-backends.in b/sysutils/system-tools-backends/files/system-tools-backends.in
new file mode 100644
index 000000000..b23f16bb2
--- /dev/null
+++ b/sysutils/system-tools-backends/files/system-tools-backends.in
@@ -0,0 +1,26 @@
+#!/bin/sh
+# $FreeBSD$
+# $MCom: ports/sysutils/system-tools-backends/files/system-tools-backends.in,v 1.5 2007/07/10 16:47:46 ahze Exp $
+
+# PROVIDE: system-tools-backends
+# REQUIRE: DAEMON dbus
+#
+# Add the following to /etc/rc.conf to start SystemToolsBackends at boot time:
+#
+# system_tools_backends_enable="YES"
+#
+
+. %%RC_SUBR%%
+. %%GNOME_SUBR%%
+
+export PATH=${PATH}:%%PREFIX%%/bin
+
+system_tools_backends_enable=${system_tools_backends_enable-${gnome_enable}}
+
+name=system_tools_backends
+rcvar=`set_rcvar`
+command="%%PREFIX%%/bin/system-tools-backends"
+pidfile="/var/run/system-tools-backends.pid"
+
+load_rc_config ${name}
+run_rc_command "$1"