Non-webmin user search
authorJamie Cameron <jcameron@webmin.com>
Wed, 14 May 2008 18:11:06 +0000 (18:11 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 14 May 2008 18:11:06 +0000 (18:11 +0000)
webminlog/CHANGELOG
webminlog/index.cgi
webminlog/lang/en
webminlog/search.cgi

index f5de679..c8a43dc 100644 (file)
@@ -19,3 +19,5 @@ Added a field for searching based on the contents of commands run or file change
 When viewing the details of a logged action, an annotation can be entered to explain why it was done.
 ---- Changes since 1.400 ----
 Added a section to the Action Details page for viewing raw log data, which can show more detail.
+---- Changes since 1.410 ----
+Added an option to search for actions by non-Webmin users (such as those authenticating via sudo).
index aed4df0..79ba238 100755 (executable)
@@ -31,7 +31,9 @@ else {
                       &ui_select("user", undef, \@unames)."<br>" ] );
        if ($access_users{'*'}) {
                push(@opts, [ 2, $text{'index_nuser'}." ".
-                                &ui_select("nuser", undef, \@unames) ]);
+                                &ui_select("nuser", undef, \@unames)."<br>" ]);
+               push(@opts, [ 3, $text{'index_ouser'}." ".
+                                &ui_textbox("ouser", undef, 20) ]);
                }
        print &ui_table_row($text{'index_susers'},
                            &ui_radio("uall", 1, \@opts));
index 1ced521..1faa124 100644 (file)
@@ -3,6 +3,7 @@ index_header=Search the Webmin log for actions ..
 index_uall=By any user
 index_user=By user
 index_nuser=By any user except
+index_ouser=By non-Webmin user
 index_mall=In any module
 index_module=In module
 index_tall=At any time
index 43d6afb..69e5dd3 100755 (executable)
@@ -53,6 +53,7 @@ while(($id, $idx) = each %index) {
        local ($pos, $time, $user, $module, $sid) = split(/\s+/, $idx);
        if (($in{'uall'} == 1 ||
             $in{'uall'} == 0 && $in{'user'} eq $user ||
+            $in{'uall'} == 3 && $in{'ouser'} eq $user ||
             $in{'uall'} == 2 && $in{'nuser'} ne $user) &&
            ($in{'mall'} || $in{'module'} eq $module) &&
            (!$in{'sid'} || $in{'sid'} eq $sid ||
@@ -103,6 +104,8 @@ if (!$in{'mall'}) {
 $searchmsg = join(" ",
        $in{'uall'} == 0 ? &text('search_critu',
                 "<tt>".&html_escape($in{'user'})."</tt>") :
+       $in{'uall'} == 3 ? &text('search_critu',
+                "<tt>".&html_escape($in{'ouser'})."</tt>") :
        $in{'uall'} == 2 ? &text('search_critnu',
                 "<tt>".&html_escape($in{'nuser'})."</tt>") : "",
        $in{'mall'} ? '' : &text('search_critm',