summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0b9f8c5)
raw | patch | inline | side by side (parent: 0b9f8c5)
author | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Aug 2009 09:33:22 +0000 (09:33 +0000) | ||
committer | janw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 27 Aug 2009 09:33:22 +0000 (09:33 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14150 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/modules/GosaSupportDaemon.pm | patch | blob | history |
index 566ba0e5726d63c78360b892847aecdf9b1bef3e..b3a43167718f6a03a631abf084648b2af918c64e 100644 (file)
}
my $cmd_line= "$sudo_cmd su - $uid -c '$command'";
open(PIPE, "$cmd_line |");
- my $result = {'resultCode' => $?};
- $result->{'command'} = $cmd_line;
+ my $result = {'command' => $cmd_line};
push @{$result->{'output'}}, <PIPE>;
+ close(PIPE);
+ my $exit_value = $? >> 8;
+ $result->{'resultCode'} = $exit_value;
return $result;
}