Author: jreidinger Date: Wed Jul 2 10:04:02 2008 New Revision: 48751 URL: http://svn.opensuse.org/viewcvs/yast?rev=48751&view=rev Log: add loging and remove output to console Modified: branches/tmp/lslezak/workshop/auth_dbus_layer/polkit.c branches/tmp/lslezak/workshop/auth_dbus_layer/polkitwrapper.py Modified: branches/tmp/lslezak/workshop/auth_dbus_layer/polkit.c URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/auth_dbus_layer/polkit.c?rev=48751&r1=48750&r2=48751&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/auth_dbus_layer/polkit.c (original) +++ branches/tmp/lslezak/workshop/auth_dbus_layer/polkit.c Wed Jul 2 10:04:02 2008 @@ -47,7 +47,14 @@ goto finish; } - if (polkit_caller_get_ck_session(caller, &session)) { + if (!(polkit_caller_get_ck_session(caller, &session))) + { + goto finish; + } + + + if (session!=NULL) + { /* We need to overwrite the UID in both the caller and the session * object */ if (!(polkit_session_set_uid(session, getuid()))) { @@ -79,7 +86,7 @@ goto finish; } - printf("Action: %s Result: %s\n", action_id, polkit_result_to_string_representation(polkit_result)); + //printf("Action: %s Result: %s\n", action_id, polkit_result_to_string_representation(polkit_result)); switch (polkit_result) { Modified: branches/tmp/lslezak/workshop/auth_dbus_layer/polkitwrapper.py URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/lslezak/workshop/auth_dbus_layer/polkitwrapper.py?rev=48751&r1=48750&r2=48751&view=diff ============================================================================== --- branches/tmp/lslezak/workshop/auth_dbus_layer/polkitwrapper.py (original) +++ branches/tmp/lslezak/workshop/auth_dbus_layer/polkitwrapper.py Wed Jul 2 10:04:02 2008 @@ -1,8 +1,14 @@ import polkitbind import AuthException +import logging def PolkitCheck(name): result = polkitbind.checkPolicyLow(name) + logging.basicConfig(level=logging.DEBUG, + format='%(asctime)s %(levelname)s %(message)s', + filename='/tmp/polkitcheck.log', + filemode='a') + logging.info('checking name %s result: %i'%(name,result)) if result==-3: raise AuthException.AccessDenied(name) elif result==-2: -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org