Bug 23639 - Traceback /usr/lib/univention-directory-policy/nfsmounts: policy and result undefined
Traceback /usr/lib/univention-directory-policy/nfsmounts: policy and result u...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: NFS
UCS 2.4
All Linux
: P5 normal (vote)
: UCS 3.0-2
Assigned To: Jürgen Kahrs
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-16 20:32 CEST by Philipp Hahn
Modified: 2012-07-20 15:25 CEST (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
Rewrite for UCS-3.0 (5.18 KB, text/plain)
2011-09-16 20:32 CEST, Philipp Hahn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2011-09-16 20:32:16 CEST
Created attachment 3535 [details]
Rewrite for UCS-3.0

/usr/lib/univention-directory-policy/nfsmounts:
> def query_policy(dn):
>     exit(result, "FAIL: failed to execute `%s'" % policy)

Neither "result" nor "policy" are defined in that function.
result is only globally defined as the result of lo.search_s() as a
two-dimensional array, which is passed to sys.exit(), which expects an INTEGER!
Comment 1 Jürgen Kahrs univentionstaff 2012-06-07 15:45:20 CEST
Wie von Philip vorgeschlagen, habe ich eine Zeile geändert in der aktuell gültigen Fassung von univention-directory-policy/nfsmounts.py:

-               exit(result, "FAIL: failed to execute `%s'" % policy)
+               exit(1, "FAIL: failed to execute `univention_policy_result %s'" % dn)


Das Paket univention-base-files habe ich gebaut und testweise installieren lasen. Die Änderung war am Ziel vorhanden.
Comment 2 Felix Botner univentionstaff 2012-07-12 17:45:07 CEST
query_policy ist korrigiert und fängt Fehler des subprocess.Popen(['univention_policy_result nun ordentlich ab.


Changelog Eintrag vorhanden.
Comment 3 Stefan Gohmann univentionstaff 2012-07-20 15:25:35 CEST
UCS 3.0-2 has been released: 
  http://forum.univention.de/viewtopic.php?f=54&t=1905

If this error occurs again, please use "Clone This Bug".