Show More
@@ -139,13 +139,8 b' def explain_exit(code):' | |||
|
139 | 139 | return _("stopped by signal %d") % val, val |
|
140 | 140 | raise ValueError(_("invalid exit code")) |
|
141 | 141 | |
|
142 |
def isowner( |
|
|
143 |
"""Return True if the |
|
|
144 | ||
|
145 | The return value of a util.fstat(f) may be passed as the st argument. | |
|
146 | """ | |
|
147 | if st is None: | |
|
148 | st = fstat(fp) | |
|
142 | def isowner(st): | |
|
143 | """Return True if the stat object st is from the current user.""" | |
|
149 | 144 | return st.st_uid == os.getuid() |
|
150 | 145 | |
|
151 | 146 | def find_exe(command): |
@@ -40,7 +40,7 b' class ui(object):' | |||
|
40 | 40 | |
|
41 | 41 | def _is_trusted(self, fp, f): |
|
42 | 42 | st = util.fstat(fp) |
|
43 |
if util.isowner( |
|
|
43 | if util.isowner(st): | |
|
44 | 44 | return True |
|
45 | 45 | |
|
46 | 46 | tusers, tgroups = self._trustusers, self._trustgroups |
General Comments 0
You need to be logged in to leave comments.
Login now