Commit 12582dad authored by David Zeuthen's avatar David Zeuthen
Browse files

be careful about what symbols we export

parent 1c4b0662
...@@ -25,9 +25,10 @@ libpolkit_dbus_la_SOURCES = \ ...@@ -25,9 +25,10 @@ libpolkit_dbus_la_SOURCES = \
polkit-dbus.h polkit-dbus.c \ polkit-dbus.h polkit-dbus.c \
polkit-simple.h polkit-simple.c polkit-simple.h polkit-simple.c
libpolkit_dbus_la_LIBADD = @DBUS_LIBS@ $(top_builddir)/src/polkit/libpolkit.la $(SELINUX_LIBS) libpolkit_dbus_la_LIBADD = @DBUS_LIBS@ $(top_builddir)/src/kit/libkit.la $(top_builddir)/src/polkit/libpolkit.la $(SELINUX_LIBS)
libpolkit_dbus_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) @R_DYNAMIC_LDFLAG@ libpolkit_dbus_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) @R_DYNAMIC_LDFLAG@ \
-export-dynamic -no-undefined -export-symbols-regex '^polkit_.*'
libexec_PROGRAMS = polkit-resolve-exe-helper libexec_PROGRAMS = polkit-resolve-exe-helper
...@@ -40,11 +41,11 @@ libexec_PROGRAMS += polkit-read-auth-helper polkit-set-default-helper ...@@ -40,11 +41,11 @@ libexec_PROGRAMS += polkit-read-auth-helper polkit-set-default-helper
polkit_read_auth_helper_SOURCES = polkit-read-auth-helper.c polkit_read_auth_helper_SOURCES = polkit-read-auth-helper.c
polkit_read_auth_helper_CFLAGS = @DBUS_CFLAGS@ polkit_read_auth_helper_CFLAGS = @DBUS_CFLAGS@
polkit_read_auth_helper_LDADD = $(top_builddir)/src/polkit/libpolkit.la libpolkit-dbus.la polkit_read_auth_helper_LDADD = $(top_builddir)/src/kit/libkit.la $(top_builddir)/src/polkit/libpolkit.la libpolkit-dbus.la
polkit_set_default_helper_SOURCES = polkit-set-default-helper.c polkit_set_default_helper_SOURCES = polkit-set-default-helper.c
polkit_set_default_helper_CFLAGS = @DBUS_CFLAGS@ polkit_set_default_helper_CFLAGS = @DBUS_CFLAGS@
polkit_set_default_helper_LDADD = $(top_builddir)/src/polkit/libpolkit.la libpolkit-dbus.la polkit_set_default_helper_LDADD = $(top_builddir)/src/kit/libkit.la $(top_builddir)/src/polkit/libpolkit.la libpolkit-dbus.la
# polkit-read-auth-helper needs to be setgid $POLKIT_GROUP to be able # polkit-read-auth-helper needs to be setgid $POLKIT_GROUP to be able
# to read authorization files in /var/lib/PolicyKit and # to read authorization files in /var/lib/PolicyKit and
......
...@@ -1277,8 +1277,8 @@ polkit_tracker_dbus_func (PolKitTracker *pk_tracker, DBusMessage *message) ...@@ -1277,8 +1277,8 @@ polkit_tracker_dbus_func (PolKitTracker *pk_tracker, DBusMessage *message)
DBUS_TYPE_INVALID)) { DBUS_TYPE_INVALID)) {
/* TODO: should be _pk_critical */ /* TODO: should be _pk_critical */
_pk_debug ("The NameOwnerChanged signal on the " DBUS_INTERFACE_DBUS " " polkit_debug ("The NameOwnerChanged signal on the " DBUS_INTERFACE_DBUS " "
"interface has the wrong signature! Your system is misconfigured."); "interface has the wrong signature! Your system is misconfigured.");
goto out; goto out;
} }
......
...@@ -32,9 +32,11 @@ if POLKIT_AUTHDB_DEFAULT ...@@ -32,9 +32,11 @@ if POLKIT_AUTHDB_DEFAULT
libpolkit_grant_la_SOURCES += polkit-authorization-db-write.c libpolkit_grant_la_SOURCES += polkit-authorization-db-write.c
endif endif
libpolkit_grant_la_LIBADD = @GLIB_LIBS@ @DBUS_LIBS@ $(top_builddir)/src/polkit/libpolkit.la libpolkit_grant_la_LIBADD = @GLIB_LIBS@ @DBUS_LIBS@ $(top_builddir)/src/kit/libkit.la $(top_builddir)/src/polkit/libpolkit.la
libpolkit_grant_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) @R_DYNAMIC_LDFLAG@ \
-export-dynamic -no-undefined -export-symbols-regex '(^polkit_.*|_polkit_authorization_db_auth_file_add)'
libpolkit_grant_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) @R_DYNAMIC_LDFLAG@
# Only if the authdb backend has the capability POLKIT_AUTHORIZATION_DB_CAPABILITY_CAN_OBTAIN # Only if the authdb backend has the capability POLKIT_AUTHORIZATION_DB_CAPABILITY_CAN_OBTAIN
# then the backend must supply the /usr/libexec/polkit-grant-helper program.. also remember to # then the backend must supply the /usr/libexec/polkit-grant-helper program.. also remember to
...@@ -68,11 +70,11 @@ endif ...@@ -68,11 +70,11 @@ endif
polkit_explicit_grant_helper_SOURCES = polkit-explicit-grant-helper.c polkit_explicit_grant_helper_SOURCES = polkit-explicit-grant-helper.c
polkit_explicit_grant_helper_CFLAGS = @DBUS_CFLAGS@ polkit_explicit_grant_helper_CFLAGS = @DBUS_CFLAGS@
polkit_explicit_grant_helper_LDADD = $(top_builddir)/src/polkit/libpolkit.la $(top_builddir)/src/polkit-dbus/libpolkit-dbus.la libpolkit-grant.la polkit_explicit_grant_helper_LDADD = $(top_builddir)/src/kit/libkit.la $(top_builddir)/src/polkit/libpolkit.la $(top_builddir)/src/polkit-dbus/libpolkit-dbus.la libpolkit-grant.la
polkit_revoke_helper_SOURCES = polkit-revoke-helper.c polkit_revoke_helper_SOURCES = polkit-revoke-helper.c
polkit_revoke_helper_CFLAGS = @DBUS_CFLAGS@ polkit_revoke_helper_CFLAGS = @DBUS_CFLAGS@
polkit_revoke_helper_LDADD = $(top_builddir)/src/polkit/libpolkit.la $(top_builddir)/src/polkit-dbus/libpolkit-dbus.la polkit_revoke_helper_LDADD = $(top_builddir)/src/kit/libkit.la $(top_builddir)/src/polkit/libpolkit.la $(top_builddir)/src/polkit-dbus/libpolkit-dbus.la
# polkit-grant-helper needs to be setgid polkituser to be able to # polkit-grant-helper needs to be setgid polkituser to be able to
# write cookies to /var/lib/PolicyKit and /var/run/PolicyKit # write cookies to /var/lib/PolicyKit and /var/run/PolicyKit
......
...@@ -73,7 +73,8 @@ endif ...@@ -73,7 +73,8 @@ endif
libpolkit_la_LIBADD = @EXPAT_LIBS@ $(top_builddir)/src/kit/libkit.la libpolkit_la_LIBADD = @EXPAT_LIBS@ $(top_builddir)/src/kit/libkit.la
libpolkit_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) @R_DYNAMIC_LDFLAG@ libpolkit_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) @R_DYNAMIC_LDFLAG@ \
-export-dynamic -no-undefined -export-symbols-regex '(^polkit_.*|_pk_validate_unique_bus_name)'
## note that TESTS has special meaning (stuff to use in make check) ## note that TESTS has special meaning (stuff to use in make check)
## so if adding tests not to be run in make check, don't add them to ## so if adding tests not to be run in make check, don't add them to
......
...@@ -248,7 +248,7 @@ void ...@@ -248,7 +248,7 @@ void
polkit_action_debug (PolKitAction *action) polkit_action_debug (PolKitAction *action)
{ {
kit_return_if_fail (action != NULL); kit_return_if_fail (action != NULL);
_pk_debug ("PolKitAction: refcount=%d id=%s", action->refcount, action->id); polkit_debug ("PolKitAction: refcount=%d id=%s", action->refcount, action->id);
} }
/** /**
......
...@@ -171,7 +171,7 @@ void ...@@ -171,7 +171,7 @@ void
polkit_authorization_constraint_debug (PolKitAuthorizationConstraint *authc) polkit_authorization_constraint_debug (PolKitAuthorizationConstraint *authc)
{ {
kit_return_if_fail (authc != NULL); kit_return_if_fail (authc != NULL);
_pk_debug ("PolKitAuthorizationConstraint: refcount=%d type=%d", authc->refcount, authc->type); polkit_debug ("PolKitAuthorizationConstraint: refcount=%d type=%d", authc->refcount, authc->type);
} }
/** /**
......
...@@ -202,7 +202,7 @@ void ...@@ -202,7 +202,7 @@ void
polkit_authorization_db_debug (PolKitAuthorizationDB *authdb) polkit_authorization_db_debug (PolKitAuthorizationDB *authdb)
{ {
kit_return_if_fail (authdb != NULL); kit_return_if_fail (authdb != NULL);
_pk_debug ("PolKitAuthorizationDB: refcount=%d", authdb->refcount); polkit_debug ("PolKitAuthorizationDB: refcount=%d", authdb->refcount);
} }
/** /**
......
...@@ -378,13 +378,13 @@ void ...@@ -378,13 +378,13 @@ void
polkit_authorization_debug (PolKitAuthorization *auth) polkit_authorization_debug (PolKitAuthorization *auth)
{ {
kit_return_if_fail (auth != NULL); kit_return_if_fail (auth != NULL);
_pk_debug ("PolKitAuthorization: refcount=%d", auth->refcount); polkit_debug ("PolKitAuthorization: refcount=%d", auth->refcount);
_pk_debug (" scope = %d", auth->scope); polkit_debug (" scope = %d", auth->scope);
_pk_debug (" pid = %d", auth->pid); polkit_debug (" pid = %d", auth->pid);
_pk_debug (" pid_start_time = %Lu", auth->pid_start_time); polkit_debug (" pid_start_time = %Lu", auth->pid_start_time);
_pk_debug (" action_id = %s", auth->action_id); polkit_debug (" action_id = %s", auth->action_id);
_pk_debug (" when = %Lu", (polkit_uint64_t) auth->when); polkit_debug (" when = %Lu", (polkit_uint64_t) auth->when);
_pk_debug (" auth_as_uid = %d", auth->authenticated_as_uid); polkit_debug (" auth_as_uid = %d", auth->authenticated_as_uid);
} }
/** /**
......
...@@ -348,8 +348,8 @@ void ...@@ -348,8 +348,8 @@ void
polkit_caller_debug (PolKitCaller *caller) polkit_caller_debug (PolKitCaller *caller)
{ {
kit_return_if_fail (caller != NULL); kit_return_if_fail (caller != NULL);
_pk_debug ("PolKitCaller: refcount=%d dbus_name=%s uid=%d pid=%d selinux_context=%s", polkit_debug ("PolKitCaller: refcount=%d dbus_name=%s uid=%d pid=%d selinux_context=%s",
caller->refcount, caller->dbus_name, caller->uid, caller->pid, caller->selinux_context); caller->refcount, caller->dbus_name, caller->uid, caller->pid, caller->selinux_context);
if (caller->session != NULL) if (caller->session != NULL)
polkit_session_debug (caller->session); polkit_session_debug (caller->session);
} }
......
...@@ -176,26 +176,26 @@ config_node_dump_real (ConfigNode *node, unsigned int indent) ...@@ -176,26 +176,26 @@ config_node_dump_real (ConfigNode *node, unsigned int indent)
switch (node->node_type) { switch (node->node_type) {
case NODE_TYPE_NOP: case NODE_TYPE_NOP:
_pk_debug ("%sNOP", buf); polkit_debug ("%sNOP", buf);
break; break;
case NODE_TYPE_TOP: case NODE_TYPE_TOP:
_pk_debug ("%sTOP", buf); polkit_debug ("%sTOP", buf);
break; break;
case NODE_TYPE_MATCH: case NODE_TYPE_MATCH:
_pk_debug ("%sMATCH %s (%d) with '%s'", polkit_debug ("%sMATCH %s (%d) with '%s'",
buf, buf,
match_names[node->data.node_match.match_type], match_names[node->data.node_match.match_type],
node->data.node_match.match_type, node->data.node_match.match_type,
node->data.node_match.data); node->data.node_match.data);
break; break;
case NODE_TYPE_RETURN: case NODE_TYPE_RETURN:
_pk_debug ("%sRETURN %s (%d)", polkit_debug ("%sRETURN %s (%d)",
buf, buf,
polkit_result_to_string_representation (node->data.node_return.result), polkit_result_to_string_representation (node->data.node_return.result),
node->data.node_return.result); node->data.node_return.result);
break; break;
case NODE_TYPE_DEFINE_ADMIN_AUTH: case NODE_TYPE_DEFINE_ADMIN_AUTH:
_pk_debug ("%sDEFINE_ADMIN_AUTH %s (%d) with '%s'", polkit_debug ("%sDEFINE_ADMIN_AUTH %s (%d) with '%s'",
buf, buf,
define_admin_auth_names[node->data.node_define_admin_auth.admin_type], define_admin_auth_names[node->data.node_define_admin_auth.admin_type],
node->data.node_define_admin_auth.admin_type, node->data.node_define_admin_auth.admin_type,
...@@ -254,7 +254,7 @@ _start (void *data, const char *el, const char **attr) ...@@ -254,7 +254,7 @@ _start (void *data, const char *el, const char **attr)
ParserData *pd = data; ParserData *pd = data;
ConfigNode *node; ConfigNode *node;
_pk_debug ("_start for node '%s' (at depth=%d)", el, pd->stack_depth); polkit_debug ("_start for node '%s' (at depth=%d)", el, pd->stack_depth);
for (num_attr = 0; attr[num_attr] != NULL; num_attr++) for (num_attr = 0; attr[num_attr] != NULL; num_attr++)
; ;
...@@ -267,10 +267,10 @@ _start (void *data, const char *el, const char **attr) ...@@ -267,10 +267,10 @@ _start (void *data, const char *el, const char **attr)
case STATE_NONE: case STATE_NONE:
if (strcmp (el, "config") == 0) { if (strcmp (el, "config") == 0) {
state = STATE_IN_CONFIG; state = STATE_IN_CONFIG;
_pk_debug ("parsed config node"); polkit_debug ("parsed config node");
if (pd->pk_config->top_config_node != NULL) { if (pd->pk_config->top_config_node != NULL) {
_pk_debug ("Multiple config nodes?"); polkit_debug ("Multiple config nodes?");
goto error; goto error;
} }
...@@ -288,18 +288,18 @@ _start (void *data, const char *el, const char **attr) ...@@ -288,18 +288,18 @@ _start (void *data, const char *el, const char **attr)
} else if (strcmp (attr[0], "user") == 0) { } else if (strcmp (attr[0], "user") == 0) {
node->data.node_match.match_type = MATCH_TYPE_USER; node->data.node_match.match_type = MATCH_TYPE_USER;
} else { } else {
_pk_debug ("Unknown match rule '%s'", attr[0]); polkit_debug ("Unknown match rule '%s'", attr[0]);
goto error; goto error;
} }
node->data.node_match.data = kit_strdup (attr[1]); node->data.node_match.data = kit_strdup (attr[1]);
if (regcomp (&(node->data.node_match.preq), node->data.node_match.data, REG_NOSUB|REG_EXTENDED) != 0) { if (regcomp (&(node->data.node_match.preq), node->data.node_match.data, REG_NOSUB|REG_EXTENDED) != 0) {
_pk_debug ("Invalid expression '%s'", node->data.node_match.data); polkit_debug ("Invalid expression '%s'", node->data.node_match.data);
goto error; goto error;
} }
state = STATE_IN_MATCH; state = STATE_IN_MATCH;
_pk_debug ("parsed match node ('%s' (%d) -> '%s')", polkit_debug ("parsed match node ('%s' (%d) -> '%s')",
attr[0], attr[0],
node->data.node_match.match_type, node->data.node_match.match_type,
node->data.node_match.data); node->data.node_match.data);
...@@ -311,17 +311,17 @@ _start (void *data, const char *el, const char **attr) ...@@ -311,17 +311,17 @@ _start (void *data, const char *el, const char **attr)
if (strcmp (attr[0], "result") == 0) { if (strcmp (attr[0], "result") == 0) {
PolKitResult r; PolKitResult r;
if (!polkit_result_from_string_representation (attr[1], &r)) { if (!polkit_result_from_string_representation (attr[1], &r)) {
_pk_debug ("Unknown return result '%s'", attr[1]); polkit_debug ("Unknown return result '%s'", attr[1]);
goto error; goto error;
} }
node->data.node_return.result = r; node->data.node_return.result = r;
} else { } else {
_pk_debug ("Unknown return rule '%s'", attr[0]); polkit_debug ("Unknown return rule '%s'", attr[0]);
goto error; goto error;
} }
state = STATE_IN_RETURN; state = STATE_IN_RETURN;
_pk_debug ("parsed return node ('%s' (%d))", polkit_debug ("parsed return node ('%s' (%d))",
attr[1], attr[1],
node->data.node_return.result); node->data.node_return.result);
} else if ((strcmp (el, "define_admin_auth") == 0) && (num_attr == 2)) { } else if ((strcmp (el, "define_admin_auth") == 0) && (num_attr == 2)) {
...@@ -332,14 +332,14 @@ _start (void *data, const char *el, const char **attr) ...@@ -332,14 +332,14 @@ _start (void *data, const char *el, const char **attr)
} else if (strcmp (attr[0], "group") == 0) { } else if (strcmp (attr[0], "group") == 0) {
node->data.node_define_admin_auth.admin_type = POLKIT_CONFIG_ADMIN_AUTH_TYPE_GROUP; node->data.node_define_admin_auth.admin_type = POLKIT_CONFIG_ADMIN_AUTH_TYPE_GROUP;
} else { } else {
_pk_debug ("Unknown define_admin_auth rule '%s'", attr[0]); polkit_debug ("Unknown define_admin_auth rule '%s'", attr[0]);
goto error; goto error;
} }
node->data.node_define_admin_auth.data = kit_strdup (attr[1]); node->data.node_define_admin_auth.data = kit_strdup (attr[1]);
state = STATE_IN_DEFINE_ADMIN_AUTH; state = STATE_IN_DEFINE_ADMIN_AUTH;
_pk_debug ("parsed define_admin_auth node ('%s' (%d) -> '%s')", polkit_debug ("parsed define_admin_auth node ('%s' (%d) -> '%s')",
attr[0], attr[0],
node->data.node_define_admin_auth.admin_type, node->data.node_define_admin_auth.admin_type,
node->data.node_define_admin_auth.data); node->data.node_define_admin_auth.data);
...@@ -356,7 +356,7 @@ _start (void *data, const char *el, const char **attr) ...@@ -356,7 +356,7 @@ _start (void *data, const char *el, const char **attr)
} }
if (pd->stack_depth < 0 || pd->stack_depth >= PARSER_MAX_DEPTH) { if (pd->stack_depth < 0 || pd->stack_depth >= PARSER_MAX_DEPTH) {
_pk_debug ("reached max depth?"); polkit_debug ("reached max depth?");
goto error; goto error;
} }
pd->state = state; pd->state = state;
...@@ -369,7 +369,7 @@ _start (void *data, const char *el, const char **attr) ...@@ -369,7 +369,7 @@ _start (void *data, const char *el, const char **attr)
} }
pd->stack_depth++; pd->stack_depth++;
_pk_debug ("now in state=%d (after _start, depth=%d)", pd->state, pd->stack_depth); polkit_debug ("now in state=%d (after _start, depth=%d)", pd->state, pd->stack_depth);
return; return;
error: error:
...@@ -389,18 +389,18 @@ _end (void *data, const char *el) ...@@ -389,18 +389,18 @@ _end (void *data, const char *el)
{ {
ParserData *pd = data; ParserData *pd = data;
_pk_debug ("_end for node '%s' (at depth=%d)", el, pd->stack_depth); polkit_debug ("_end for node '%s' (at depth=%d)", el, pd->stack_depth);
--pd->stack_depth; --pd->stack_depth;
if (pd->stack_depth < 0 || pd->stack_depth >= PARSER_MAX_DEPTH) { if (pd->stack_depth < 0 || pd->stack_depth >= PARSER_MAX_DEPTH) {
_pk_debug ("reached max depth?"); polkit_debug ("reached max depth?");
goto error; goto error;
} }
if (pd->stack_depth > 0) if (pd->stack_depth > 0)
pd->state = pd->state_stack[pd->stack_depth - 1]; pd->state = pd->state_stack[pd->stack_depth - 1];
else else
pd->state = STATE_NONE; pd->state = STATE_NONE;
_pk_debug ("now in state=%d (after _end, depth=%d)", pd->state, pd->stack_depth); polkit_debug ("now in state=%d (after _end, depth=%d)", pd->state, pd->stack_depth);
return; return;
error: error:
XML_StopParser (pd->parser, FALSE); XML_StopParser (pd->parser, FALSE);
...@@ -471,7 +471,7 @@ polkit_config_new (const char *path, PolKitError **error) ...@@ -471,7 +471,7 @@ polkit_config_new (const char *path, PolKitError **error)
XML_ParserFree (pd.parser); XML_ParserFree (pd.parser);
kit_free (buf); kit_free (buf);
_pk_debug ("Loaded configuration file %s", path); polkit_debug ("Loaded configuration file %s", path);
if (pk_config->top_config_node != NULL) if (pk_config->top_config_node != NULL)
config_node_dump (pk_config->top_config_node); config_node_dump (pk_config->top_config_node);
......
...@@ -152,7 +152,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -152,7 +152,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
kit_return_val_if_fail (pk_context != NULL, FALSE); kit_return_val_if_fail (pk_context != NULL, FALSE);
pk_context->policy_dir = kit_strdup (PACKAGE_DATA_DIR "/PolicyKit/policy"); pk_context->policy_dir = kit_strdup (PACKAGE_DATA_DIR "/PolicyKit/policy");
_pk_debug ("Using policy files from directory %s", pk_context->policy_dir); polkit_debug ("Using policy files from directory %s", pk_context->policy_dir);
/* NOTE: we don't populate the cache until it's needed.. */ /* NOTE: we don't populate the cache until it's needed.. */
...@@ -162,7 +162,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -162,7 +162,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
if (pk_context->io_add_watch_func != NULL) { if (pk_context->io_add_watch_func != NULL) {
pk_context->inotify_fd = port_create (); pk_context->inotify_fd = port_create ();
if (pk_context->inotify_fd < 0) { if (pk_context->inotify_fd < 0) {
_pk_debug ("failed to port_create: %s", strerror (errno)); polkit_debug ("failed to port_create: %s", strerror (errno));
/* TODO: set error */ /* TODO: set error */
goto error; goto error;
} }
...@@ -172,7 +172,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -172,7 +172,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
PACKAGE_SYSCONF_DIR "/PolicyKit/PolicyKit.conf", PACKAGE_SYSCONF_DIR "/PolicyKit/PolicyKit.conf",
FILE_MODIFIED | FILE_ATTRIB); FILE_MODIFIED | FILE_ATTRIB);
if (pk_context->inotify_config_wd < 0) { if (pk_context->inotify_config_wd < 0) {
_pk_debug ("failed to add watch on file '" PACKAGE_SYSCONF_DIR "/PolicyKit/PolicyKit.conf': %s", polkit_debug ("failed to add watch on file '" PACKAGE_SYSCONF_DIR "/PolicyKit/PolicyKit.conf': %s",
strerror (errno)); strerror (errno));
/* TODO: set error */ /* TODO: set error */
goto error; goto error;
...@@ -183,7 +183,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -183,7 +183,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
PACKAGE_DATA_DIR "/PolicyKit/policy", PACKAGE_DATA_DIR "/PolicyKit/policy",
FILE_MODIFIED | FILE_ATTRIB); FILE_MODIFIED | FILE_ATTRIB);
if (pk_context->inotify_policy_wd < 0) { if (pk_context->inotify_policy_wd < 0) {
_pk_debug ("failed to add watch on directory '" PACKAGE_DATA_DIR "/PolicyKit/policy': %s", polkit_debug ("failed to add watch on directory '" PACKAGE_DATA_DIR "/PolicyKit/policy': %s",
strerror (errno)); strerror (errno));
/* TODO: set error */ /* TODO: set error */
goto error; goto error;
...@@ -195,7 +195,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -195,7 +195,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
PACKAGE_LOCALSTATE_DIR "/lib/misc/PolicyKit.reload", PACKAGE_LOCALSTATE_DIR "/lib/misc/PolicyKit.reload",
FILE_MODIFIED | FILE_ATTRIB); FILE_MODIFIED | FILE_ATTRIB);
if (pk_context->inotify_grant_perm_wd < 0) { if (pk_context->inotify_grant_perm_wd < 0) {
_pk_debug ("failed to add watch on file '" PACKAGE_LOCALSTATE_DIR "/lib/misc/PolicyKit.reload': %s", polkit_debug ("failed to add watch on file '" PACKAGE_LOCALSTATE_DIR "/lib/misc/PolicyKit.reload': %s",
strerror (errno)); strerror (errno));
/* TODO: set error */ /* TODO: set error */
goto error; goto error;
...@@ -204,7 +204,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -204,7 +204,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
pk_context->inotify_fd_watch_id = pk_context->io_add_watch_func (pk_context, pk_context->inotify_fd); pk_context->inotify_fd_watch_id = pk_context->io_add_watch_func (pk_context, pk_context->inotify_fd);
if (pk_context->inotify_fd_watch_id == 0) { if (pk_context->inotify_fd_watch_id == 0) {
_pk_debug ("failed to add io watch"); polkit_debug ("failed to add io watch");
/* TODO: set error */ /* TODO: set error */
goto error; goto error;
} }
...@@ -214,7 +214,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -214,7 +214,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
if (pk_context->io_add_watch_func != NULL) { if (pk_context->io_add_watch_func != NULL) {
pk_context->inotify_fd = inotify_init (); pk_context->inotify_fd = inotify_init ();
if (pk_context->inotify_fd < 0) { if (pk_context->inotify_fd < 0) {
_pk_debug ("failed to initialize inotify: %s", strerror (errno)); polkit_debug ("failed to initialize inotify: %s", strerror (errno));
/* TODO: set error */ /* TODO: set error */
goto error; goto error;
} }
...@@ -224,7 +224,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -224,7 +224,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
PACKAGE_SYSCONF_DIR "/PolicyKit/PolicyKit.conf", PACKAGE_SYSCONF_DIR "/PolicyKit/PolicyKit.conf",
IN_MODIFY | IN_CREATE | IN_ATTRIB); IN_MODIFY | IN_CREATE | IN_ATTRIB);
if (pk_context->inotify_config_wd < 0) { if (pk_context->inotify_config_wd < 0) {
_pk_debug ("failed to add watch on file '" PACKAGE_SYSCONF_DIR "/PolicyKit/PolicyKit.conf': %s", polkit_debug ("failed to add watch on file '" PACKAGE_SYSCONF_DIR "/PolicyKit/PolicyKit.conf': %s",
strerror (errno)); strerror (errno));
/* TODO: set error */ /* TODO: set error */
goto error; goto error;
...@@ -235,7 +235,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -235,7 +235,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
PACKAGE_DATA_DIR "/PolicyKit/policy", PACKAGE_DATA_DIR "/PolicyKit/policy",
IN_MODIFY | IN_CREATE | IN_DELETE | IN_ATTRIB); IN_MODIFY | IN_CREATE | IN_DELETE | IN_ATTRIB);
if (pk_context->inotify_policy_wd < 0) { if (pk_context->inotify_policy_wd < 0) {
_pk_debug ("failed to add watch on directory '" PACKAGE_DATA_DIR "/PolicyKit/policy': %s", polkit_debug ("failed to add watch on directory '" PACKAGE_DATA_DIR "/PolicyKit/policy': %s",
strerror (errno)); strerror (errno));
/* TODO: set error */ /* TODO: set error */
goto error; goto error;
...@@ -247,7 +247,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -247,7 +247,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
PACKAGE_LOCALSTATE_DIR "/lib/misc/PolicyKit.reload", PACKAGE_LOCALSTATE_DIR "/lib/misc/PolicyKit.reload",
IN_MODIFY | IN_CREATE | IN_ATTRIB); IN_MODIFY | IN_CREATE | IN_ATTRIB);
if (pk_context->inotify_grant_perm_wd < 0) { if (pk_context->inotify_grant_perm_wd < 0) {
_pk_debug ("failed to add watch on file '" PACKAGE_LOCALSTATE_DIR "/lib/misc/PolicyKit.reload': %s", polkit_debug ("failed to add watch on file '" PACKAGE_LOCALSTATE_DIR "/lib/misc/PolicyKit.reload': %s",
strerror (errno)); strerror (errno));
/* TODO: set error */ /* TODO: set error */
goto error; goto error;
...@@ -256,7 +256,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error) ...@@ -256,7 +256,7 @@ polkit_context_init (PolKitContext *pk_context, PolKitError **error)
pk_context->inotify_fd_watch_id = pk_context->io_add_watch_func (pk_context, pk_context->inotify_fd); pk_context->inotify_fd_watch_id = pk_context->io_add_watch_func (pk_context, pk_context->inotify_fd);
if (pk_context->inotify_fd_watch_id == 0) { if (pk_context->inotify_fd_watch_id == 0) {
_pk_debug ("failed to add io watch"); polkit_debug ("failed to add io watch");
/* TODO: set error */ /* TODO: set error */
goto error; goto error;
} }
...@@ -292,7 +292,7 @@ port_add_watch (int port, const char *name, uint32_t events) ...@@ -292,7 +292,7 @@ port_add_watch (int port, const char *name, uint32_t events)
struct fileportinfo *fpi; struct fileportinfo *fpi;
if ( (fpi = kit_malloc (sizeof(struct fileportinfo)) ) == NULL ) { if ( (fpi = kit_malloc (sizeof(struct fileportinfo)) ) == NULL ) {
_pk_debug ("Faile to kit_malloc!"); polkit_debug ("Faile to kit_malloc!");
/* TODO: set error */ /* TODO: set error */
return -1;