From 53ec70e5a07f4ae85e13c02f48e5a96dec06ed30 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Fri, 30 Mar 2012 14:07:05 +0200 Subject: [PATCH] Show note about possibly incomplete 'zypper ps' if not run as root (bnc#710872) --- src/utils/misc.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/utils/misc.cc b/src/utils/misc.cc index 7f64b84..ec3d1dc 100644 --- a/src/utils/misc.cc +++ b/src/utils/misc.cc @@ -454,6 +454,14 @@ void list_processes_using_deleted_files(Zypper & zypper) " in the above table."), "man zypper")); } + + if ( geteuid() != 0 ) + { + zypper.out().info(""); + zypper.out().info(_("Note: Not running as root you are limited to searching for files" + " you have permission to examine with the system stat(2) function." + " The result might be incomplete.")); + } } // ---------------------------------------------------------------------------- -- 2.7.4