summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-20 19:53:01 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-20 19:53:01 +0000
commitd294ef80722f726700246cfce288339e9625dbaa (patch)
tree16c8e1f1535dd18bafafb92d0a5ed9b7c2b78d60 /bin
parent9890b1fafd8c98c4c05d9299274ce9818072be14 (diff)
downloaddrakx-net-d294ef80722f726700246cfce288339e9625dbaa.tar
drakx-net-d294ef80722f726700246cfce288339e9625dbaa.tar.gz
drakx-net-d294ef80722f726700246cfce288339e9625dbaa.tar.bz2
drakx-net-d294ef80722f726700246cfce288339e9625dbaa.tar.xz
drakx-net-d294ef80722f726700246cfce288339e9625dbaa.zip
do not fork useless shells, also should help with variables with
spaces or other "strange" characters in
Diffstat (limited to 'bin')
-rwxr-xr-xbin/draksambashare8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/draksambashare b/bin/draksambashare
index 90d5a0a..95e75ad 100755
--- a/bin/draksambashare
+++ b/bin/draksambashare
@@ -183,7 +183,7 @@ sub get_items() {
[ N("/_Help") . N("/_Samba Documentation"), undef, sub {
$in->do_pkgs->ensure_is_installed('samba-doc', '/usr/share/doc/samba-doc');
- system("/usr/bin/www-browser /usr/share/doc/samba-doc/htmldocs/index.html &");
+ run_program::raw({ detach => 1 }, 'www-browser', '/usr/share/doc/samba-doc/htmldocs/index.html');
},
1, '<Item>', ],
@@ -899,7 +899,7 @@ sub remove_entry {
sub remove_user {
my ($user) = @_;
- system("smbpasswd -x $user");
+ system('smbpasswd', '-x', $user);
}
sub get_user() {
@@ -942,7 +942,7 @@ sub modify_user_info {
if (any { /^$user_selected:/ } cat_("/etc/samba/smbpasswd")) {
err_dialog(N("Error"), ("Samba User already exist")) and return;
}
- system("smbpasswd -a $user_selected -n");
+ system('smbpasswd', '-a', $user_selected, '-n');
push @{$user_list->{data}}, [
$pixbuf_user,
$user_selected,
@@ -1265,7 +1265,7 @@ sub global_special_options() {
my $conf = "/etc/group";
my @groups = map { if_(m/^([^#:]+):[^:]+:([^:]+):/ and $2 > 499, $1) } cat_($conf);
foreach (@groups) {
- system("net groupmap add unixgroup=$_ ntgroup=$_");
+ system(qw(net groupmap add), "unixgroup=$_", "ntgroup=$_");
}
}