View previous topic :: View next topic |
Author |
Message |
aramis_qc Tux's lil' helper
Joined: 24 Sep 2006 Posts: 106 Location: Québec - Canada
|
Posted: Wed Feb 15, 2012 1:51 pm Post subject: equery files --filter=cmd does not report files in /usr/sbin |
|
|
I've been using gentoolkit for long. I recently noted that
Code: | equery files --filter=cm ebuild_name |
does not list files in /usr/sbin when query is ran without root privileges.
On the other hand when module files is used with no option then contents of /usr/sbin is output. Same holds true when equery is submitted with --filter=tree or --filter=type as regular user. That is everything is listed.
Does anyone know a reason ?
Thank's in advance.[/code]
This is solved. No room in subject field to include mention _________________ Profil et systèmes
Last edited by aramis_qc on Thu Feb 16, 2012 1:18 pm; edited 2 times in total |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9538 Location: beyond the rim
|
Posted: Thu Feb 16, 2012 10:27 am Post subject: |
|
|
It's not a security measure if that's your concern, the --filter=cmd option simply lists files that are contained in the calling users PATH:
Code: | 150 def filter_by_command(contents):
151 """Return a copy of content filtered by executable commands."""
152
153 filtered_content = {}
154 userpath = os.environ["PATH"].split(os.pathsep)
155 userpath = [os.path.normpath(x) for x in userpath]
156 for path in contents:
157 if (contents[path][0] in ['obj', 'sym'] and
158 os.path.dirname(path) in userpath):
159 filtered_content[path] = contents[path]
160
161 return filtered_content
|
|
|
Back to top |
|
|
aramis_qc Tux's lil' helper
Joined: 24 Sep 2006 Posts: 106 Location: Québec - Canada
|
Posted: Thu Feb 16, 2012 1:16 pm Post subject: |
|
|
Thank's a lot ! _________________ Profil et systèmes |
|
Back to top |
|
|
|