BuildRequires: pkgconfig(pkgmgr-info)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(libcurl)
-BuildRequires: pkgconfig(libprivilege-control)
+BuildRequires: pkgconfig(cynara-client)
+BuildRequires: pkgconfig(cynara-creds-gdbus)
+BuildRequires: pkgconfig(cynara-session)
BuildRequires: python
BuildRequires: python-xml
void net_nfc_client_gdbus_deinit(void);
-GVariant *net_nfc_client_gdbus_get_privilege();
-
#ifdef __cplusplus
}
#endif
{
}
-GVariant *net_nfc_client_gdbus_get_privilege()
-{
- return net_nfc_util_gdbus_buffer_to_variant(NULL, 0);
-}
-
void net_nfc_client_gdbus_init(void)
{
#if 0 /* change gdbus init time */
net_nfc_gdbus_handover_call_request(handover_proxy,
GPOINTER_TO_UINT(tag_handle),
arg_type,
- net_nfc_client_gdbus_get_privilege(),
NULL,
p2p_connection_handover,
funcdata);
if (net_nfc_gdbus_handover_call_request_sync(handover_proxy,
GPOINTER_TO_UINT(tag_handle),
arg_type,
- net_nfc_client_gdbus_get_privilege(),
(gint32 *)&out_result,
(gint32 *)&out_type,
&out_data,
}
if (net_nfc_gdbus_hce_call_start_hce_handler_sync(hce_proxy,
- net_nfc_client_gdbus_get_privilege(), &result,
- NULL, &error) == true) {
+ &result, NULL, &error) == true) {
hce_handler.hce_event_cb = callback;
hce_handler.hce_data = user_data;
} else {
}
if (net_nfc_gdbus_hce_call_stop_hce_handler_sync(hce_proxy,
- net_nfc_client_gdbus_get_privilege(), &result,
- NULL, &error) == true) {
+ &result, NULL, &error) == true) {
hce_handler.hce_event_cb = NULL;
hce_handler.hce_data = NULL;
} else {
hce_proxy,
GPOINTER_TO_UINT(handle),
arg_data,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == true) {
net_nfc_gdbus_llcp_call_config(llcp_proxy,
variant,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_config,
func_data);
if (net_nfc_gdbus_llcp_call_config_sync(llcp_proxy,
variant,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
socket_data->type,
socket_data->sap,
service_name,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_listen,
func_data);
socket_data->type,
socket_data->sap,
service_name,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_client_socket,
NULL,
net_nfc_gdbus_llcp_call_accept(llcp_proxy,
GPOINTER_TO_UINT(llcp_handle),
socket,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_accept,
func_data);
if (net_nfc_gdbus_llcp_call_accept_sync(llcp_proxy,
GPOINTER_TO_UINT(llcp_handle),
socket,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == false) {
net_nfc_gdbus_llcp_call_reject(llcp_proxy,
GPOINTER_TO_UINT(llcp_handle),
socket,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_reject,
func_data);
if (net_nfc_gdbus_llcp_call_reject_sync(llcp_proxy,
GPOINTER_TO_UINT(llcp_handle),
socket,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == false) {
socket_data->rw,
socket_data->type,
service_name,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_connect,
func_data);
socket_data->rw,
socket_data->type,
service_name,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_client_socket,
NULL,
socket_data->rw,
socket_data->type,
sap,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_connect_sap,
func_data);
socket_data->rw,
socket_data->type,
sap,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_client_socket,
NULL,
GPOINTER_TO_UINT(llcp_handle),
socket_data->client_socket,
variant,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_send,
func_data);
GPOINTER_TO_UINT(llcp_handle),
socket_data->client_socket,
variant,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_client_socket,
NULL,
socket_data->client_socket,
sap,
variant,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_send_to,
func_data);
socket_data->client_socket,
sap,
variant,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_client_socket,
NULL,
GPOINTER_TO_UINT(llcp_handle),
socket_data->client_socket,
request_length,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_receive,
func_data);
GPOINTER_TO_UINT(llcp_handle),
socket_data->client_socket,
request_length,
- net_nfc_client_gdbus_get_privilege(),
&result,
&variant,
NULL,
GPOINTER_TO_UINT(llcp_handle),
socket_data->client_socket,
request_length,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_receive_from,
func_data);
GPOINTER_TO_UINT(llcp_handle),
socket_data->client_socket,
request_length,
- net_nfc_client_gdbus_get_privilege(),
&result,
&sap,
&variant,
net_nfc_gdbus_llcp_call_close(llcp_proxy,
GPOINTER_TO_UINT(llcp_handle),
socket_data->client_socket,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_close,
func_data);
if (net_nfc_gdbus_llcp_call_close_sync(llcp_proxy,
GPOINTER_TO_UINT(llcp_handle),
socket_data->client_socket,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_client_socket,
NULL,
net_nfc_gdbus_llcp_call_disconnect(llcp_proxy,
GPOINTER_TO_UINT(llcp_handle),
socket_data->client_socket,
- net_nfc_client_gdbus_get_privilege(),
NULL,
llcp_call_disconnect,
func_data);
if (net_nfc_gdbus_llcp_call_disconnect_sync(llcp_proxy,
GPOINTER_TO_UINT(llcp_handle),
socket_data->client_socket,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_client_socket,
NULL,
net_nfc_gdbus_manager_call_set_active(auto_start_proxy,
active,
- net_nfc_client_gdbus_get_privilege(),
NULL,
manager_call_set_active_callback,
func_data);
if (net_nfc_gdbus_manager_call_set_active_sync(auto_start_proxy,
(gboolean)state,
- net_nfc_client_gdbus_get_privilege(),
&out_result,
NULL,
&error) == FALSE)
func_data->user_data = user_data;
net_nfc_gdbus_manager_call_get_server_state(manager_proxy,
- net_nfc_client_gdbus_get_privilege(),
NULL,
manager_call_get_server_state_callback,
func_data);
}
if (net_nfc_gdbus_manager_call_get_server_state_sync(manager_proxy,
- net_nfc_client_gdbus_get_privilege(),
&out_result,
&out_state,
NULL,
net_nfc_gdbus_ndef_call_read(ndef_proxy,
GPOINTER_TO_UINT(handle),
- net_nfc_client_gdbus_get_privilege(),
NULL,
ndef_call_read,
func_data);
if (net_nfc_gdbus_ndef_call_read_sync(ndef_proxy,
GPOINTER_TO_UINT(handle),
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
&out_data,
NULL,
net_nfc_gdbus_ndef_call_write(ndef_proxy,
GPOINTER_TO_UINT(handle),
arg_data,
- net_nfc_client_gdbus_get_privilege(),
NULL,
ndef_call_write,
func_data);
if (net_nfc_gdbus_ndef_call_write_sync(ndef_proxy ,
GPOINTER_TO_UINT(handle),
arg_data,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
NULL,
&error) == FALSE)
net_nfc_gdbus_ndef_call_make_read_only(ndef_proxy,
GPOINTER_TO_UINT(handle),
- net_nfc_client_gdbus_get_privilege(),
NULL,
ndef_call_make_read_only,
func_data);
if (net_nfc_gdbus_ndef_call_make_read_only_sync(ndef_proxy,
GPOINTER_TO_UINT(handle),
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
NULL,
&error) == FALSE)
net_nfc_gdbus_ndef_call_format(ndef_proxy ,
GPOINTER_TO_UINT(handle),
arg_data,
- net_nfc_client_gdbus_get_privilege(),
NULL,
ndef_call_format,
func_data);
if (net_nfc_gdbus_ndef_call_format_sync(ndef_proxy ,
GPOINTER_TO_UINT(handle),
arg_data,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
NULL,
&error) == FALSE)
0 /* FIXME */,
arg_data,
GPOINTER_TO_UINT(handle),
- net_nfc_client_gdbus_get_privilege(),
NULL,
p2p_call_send,
func_data);
0 /* FIXME */,
arg_data,
GPOINTER_TO_UINT(handle),
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
NULL,
&error) == FALSE)
if (net_nfc_gdbus_secure_element_call_check_transaction_permission_sync(
NET_NFC_GDBUS_SECURE_ELEMENT(source_object),
arg_aid,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == false) {
net_nfc_gdbus_secure_element_call_set(
se_proxy,
(gint)se_type,
- net_nfc_client_gdbus_get_privilege(),
NULL,
set_secure_element,
func_data);
if (net_nfc_gdbus_secure_element_call_set_sync(
se_proxy,
(gint)se_type,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
#else
if (net_nfc_gdbus_secure_element_call_get_sync(
se_proxy,
- net_nfc_client_gdbus_get_privilege(),
&result,
&type,
NULL,
if (net_nfc_gdbus_secure_element_call_set_card_emulation_sync(
se_proxy,
(gint)mode,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
if (net_nfc_gdbus_secure_element_call_get_card_emulation_sync(
se_proxy,
- net_nfc_client_gdbus_get_privilege(),
&result,
&type,
NULL,
net_nfc_gdbus_secure_element_call_open_secure_element(
auto_start_proxy,
(gint)se_type,
- net_nfc_client_gdbus_get_privilege(),
NULL,
open_secure_element,
func_data);
if (net_nfc_gdbus_secure_element_call_open_secure_element_sync(
auto_start_proxy,
se_type,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_handle,
NULL,
net_nfc_gdbus_secure_element_call_close_secure_element(
auto_start_proxy,
GPOINTER_TO_UINT(handle),
- net_nfc_client_gdbus_get_privilege(),
NULL,
close_secure_element,
func_data);
if (net_nfc_gdbus_secure_element_call_close_secure_element_sync(
auto_start_proxy,
GPOINTER_TO_UINT(handle),
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
net_nfc_gdbus_secure_element_call_get_atr(
auto_start_proxy,
GPOINTER_TO_UINT(handle),
- net_nfc_client_gdbus_get_privilege(),
NULL,
get_atr_secure_element,
func_data);
if (net_nfc_gdbus_secure_element_call_get_atr_sync(
auto_start_proxy,
GPOINTER_TO_UINT(handle),
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_atr,
NULL,
auto_start_proxy,
GPOINTER_TO_UINT(handle),
arg_data,
- net_nfc_client_gdbus_get_privilege(),
NULL,
send_apdu_secure_element,
func_data);
auto_start_proxy,
GPOINTER_TO_UINT(handle),
arg_data,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_data,
NULL,
if (net_nfc_gdbus_secure_element_call_set_transaction_fg_dispatch_sync(
auto_start_proxy,
mode,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) != true) {
switch_on,
switch_off,
battery_off,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
se_proxy,
se_type,
aid,
- net_nfc_client_gdbus_get_privilege(),
&result,
&ret,
NULL,
se_proxy,
se_type,
category,
- net_nfc_client_gdbus_get_privilege(),
&result,
&ret,
NULL,
se_proxy,
se_type,
category,
- net_nfc_client_gdbus_get_privilege(),
&result,
&aids,
NULL,
se_proxy,
se_type,
category,
- net_nfc_client_gdbus_get_privilege(),
&result,
&aids,
NULL,
se_type,
category,
aid,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
se_type,
category,
aid,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
se_proxy,
se_type,
category,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
if (net_nfc_gdbus_secure_element_call_get_registered_handlers_sync(
se_proxy,
category,
- net_nfc_client_gdbus_get_privilege(),
&result,
&handlers,
NULL,
category,
unlock_required,
power,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
auto_start_proxy,
package,
aid,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
if (net_nfc_gdbus_secure_element_call_remove_package_aids_sync(
auto_start_proxy,
package,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
sap,
san,
GPOINTER_TO_UINT(parameter),
- net_nfc_client_gdbus_get_privilege(),
(gint *)&result,
NULL,
&error) == FALSE)
sap,
san,
GPOINTER_TO_UINT(parameter),
- net_nfc_client_gdbus_get_privilege(),
(gint *)&result,
NULL,
&error) == FALSE)
GPOINTER_TO_UINT(target),
snep_type,
ndef_msg,
- net_nfc_client_gdbus_get_privilege(),
NULL,
snep_send_client_request,
parameter);
GPOINTER_TO_UINT(target),
snep_type,
arg_msg,
- net_nfc_client_gdbus_get_privilege(),
&result,
resp_type,
&resp_msg,
snep_proxy,
GPOINTER_TO_UINT(target),
GPOINTER_TO_UINT(service),
- net_nfc_client_gdbus_get_privilege(),
(gint *)&result,
NULL,
&error) == FALSE)
sap,
san,
GPOINTER_TO_UINT(parameter),
- net_nfc_client_gdbus_get_privilege(),
(gint *)&result,
NULL,
&error) == FALSE)
if (net_nfc_gdbus_snep_call_server_unregister_sync(snep_proxy,
sap,
san,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&result,
NULL,
&error) == FALSE)
net_nfc_gdbus_popup_call_set(popup_proxy,
state,
CHECK_FOREGROUND,
- net_nfc_client_gdbus_get_privilege(),
NULL,
popup_set_active_callback,
func_data);
if (net_nfc_gdbus_popup_call_set_sync(popup_proxy,
state,
CHECK_FOREGROUND,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
net_nfc_gdbus_popup_call_set(popup_proxy,
state,
NO_CHECK_FOREGROUND,
- net_nfc_client_gdbus_get_privilege(),
NULL,
popup_set_active_callback,
func_data);
if (net_nfc_gdbus_popup_call_set_sync(popup_proxy,
state,
NO_CHECK_FOREGROUND,
- net_nfc_client_gdbus_get_privilege(),
&result,
NULL,
&error) == FALSE)
}
if (net_nfc_gdbus_popup_call_get_sync(popup_proxy,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_state,
NULL,
return client_target_info;
}
-/* public APIs */
-#if 0
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_tag_is_tag_connected(
- net_nfc_client_tag_is_tag_connected_completed callback,
- void *user_data)
-{
- NetNfcCallback *func_data;
-
- if (tag_proxy == NULL)
- return NET_NFC_NOT_INITIALIZED;
-
- /* prevent executing daemon when nfc is off */
- if (net_nfc_client_manager_is_activated() == false) {
- return NET_NFC_INVALID_STATE;
- }
-
- func_data = g_try_new0(NetNfcCallback, 1);
- if (func_data == NULL)
- return NET_NFC_ALLOC_FAIL;
-
- func_data->callback = (gpointer)callback;
- func_data->user_data = user_data;
-
- net_nfc_gdbus_tag_call_is_tag_connected(tag_proxy,
- net_nfc_client_gdbus_get_privilege(),
- NULL,
- tag_is_tag_connected,
- func_data);
-
- return NET_NFC_OK;
-}
-#endif
NET_NFC_EXPORT_API
net_nfc_error_e net_nfc_client_tag_is_tag_connected_sync(
net_nfc_target_type_e *dev_type)
if (info == NULL) {
/* try to request target information from server */
if (net_nfc_gdbus_tag_call_is_tag_connected_sync(tag_proxy,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_is_connected,
(gint *)&out_dev_type,
return result;
}
-#if 0
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_tag_get_current_tag_info(
- net_nfc_client_tag_get_current_tag_info_completed callback,
- void *user_data)
-{
- NetNfcCallback *func_data;
-
- if (tag_proxy == NULL)
- return NET_NFC_NOT_INITIALIZED;
-
- /* prevent executing daemon when nfc is off */
- if (net_nfc_client_manager_is_activated() == false) {
- return NET_NFC_INVALID_STATE;
- }
-
- func_data = g_try_new0(NetNfcCallback, 1);
- if (func_data == NULL) {
- return NET_NFC_ALLOC_FAIL;
- }
-
- func_data->callback = (gpointer)callback;
- func_data->user_data = user_data;
-
- net_nfc_gdbus_tag_call_get_current_tag_info(tag_proxy,
- net_nfc_client_gdbus_get_privilege(),
- NULL,
- tag_get_current_tag_info,
- func_data);
-
- return NET_NFC_OK;
-}
-#endif
-
NET_NFC_EXPORT_API
net_nfc_error_e net_nfc_client_barcode_get_barcode_sync(
}
if (net_nfc_gdbus_tag_call_get_barcode_sync(tag_proxy,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_barcode,
NULL,
if (net_nfc_client_tag_get_client_target_info() == NULL) {
/* try to request target information from server */
if (net_nfc_gdbus_tag_call_get_current_tag_info_sync(tag_proxy,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_is_connected,
&out_handle,
return result;
}
-#if 0
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_tag_get_current_target_handle(
- net_nfc_client_tag_get_current_target_handle_completed callback,
- void *user_data)
-{
- NetNfcCallback *func_data;
-
- if (tag_proxy == NULL)
- return NET_NFC_NOT_INITIALIZED;
-
- /* prevent executing daemon when nfc is off */
- if (net_nfc_client_manager_is_activated() == false) {
- return NET_NFC_INVALID_STATE;
- }
-
- func_data = g_try_new0(NetNfcCallback, 1);
- if (func_data == NULL) {
- return NET_NFC_ALLOC_FAIL;
- }
-
- func_data->callback = (gpointer)callback;
- func_data->user_data = user_data;
-
- net_nfc_gdbus_tag_call_get_current_target_handle(tag_proxy,
- net_nfc_client_gdbus_get_privilege(),
- NULL,
- tag_get_current_target_handle,
- func_data);
- return NET_NFC_OK;
-}
-#endif
NET_NFC_EXPORT_API
net_nfc_error_e net_nfc_client_tag_get_current_target_handle_sync(
net_nfc_target_handle_h *handle)
if (info == NULL) {
if (net_nfc_gdbus_tag_call_get_current_target_handle_sync(
tag_proxy,
- net_nfc_client_gdbus_get_privilege(),
&result,
&out_is_connected,
&out_handle,
func_data->user_data = user_data;
net_nfc_gdbus_test_call_sim_test(test_proxy,
- net_nfc_client_gdbus_get_privilege(),
NULL,
test_call_sim_test_callback,
func_data);
}
if (net_nfc_gdbus_test_call_sim_test_sync(test_proxy,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
NULL,
&error) == FALSE)
net_nfc_gdbus_test_call_prbs_test(test_proxy,
tech,
rate,
- net_nfc_client_gdbus_get_privilege(),
NULL,
test_call_prbs_test_callback,
func_data);
if (net_nfc_gdbus_test_call_prbs_test_sync(test_proxy,
tech,
rate,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
NULL,
&error) == FALSE)
func_data->user_data = user_data;
net_nfc_gdbus_test_call_get_firmware_version(test_proxy,
- net_nfc_client_gdbus_get_privilege(),
NULL,
test_call_get_firmware_version_callback,
func_data);
}
if (net_nfc_gdbus_test_call_get_firmware_version_sync(test_proxy,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
&out_version,
NULL,
mode,
reg_id,
variant,
- net_nfc_client_gdbus_get_privilege(),
NULL,
test_call_set_ee_data_callback,
func_data);
mode,
reg_id,
variant,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
NULL,
&error) == FALSE)
func_data->user_data = user_data;
net_nfc_gdbus_test_call_ese_test(test_proxy,
- net_nfc_client_gdbus_get_privilege(),
NULL,
test_call_ese_test_callback,
func_data);
}
if (net_nfc_gdbus_test_call_ese_test_sync(test_proxy,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
NULL,
&error) == FALSE)
if (net_nfc_gdbus_test_call_set_se_tech_type_sync(test_proxy,
(guint32)type,
(guint32)tech,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
NULL,
&error) == FALSE)
GPOINTER_TO_UINT(handle),
target_info->devType,
arg_data,
- net_nfc_client_gdbus_get_privilege(),
NULL,
transceive_call,
funcdata);
GPOINTER_TO_UINT(handle),
target_info->devType,
arg_data,
- net_nfc_client_gdbus_get_privilege(),
NULL,
transceive_data_call,
funcdata);
GPOINTER_TO_UINT(handle),
target_info->devType,
arg_data,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
NULL,
&error) == FALSE)
GPOINTER_TO_UINT(handle),
target_info->devType,
arg_data,
- net_nfc_client_gdbus_get_privilege(),
(gint *)&out_result,
&out_data,
NULL,
NET_NFC_NO_LAUNCH_APP_SELECT,
} net_nfc_launch_popup_state_e;
+typedef enum _net_nfc_privilege_e
+{
+ NET_NFC_PRIVILEGE_NFC = 0x00,
+ NET_NFC_PRIVILEGE_NFC_ADMIN,
+ NET_NFC_PRIVILEGE_NFC_TAG,
+ NET_NFC_PRIVILEGE_NFC_P2P,
+ NET_NFC_PRIVILEGE_NFC_CARD_EMUL
+} net_nfc_privilege_e;
+
/* server state */
#define NET_NFC_SERVER_IDLE 0
#define NET_NFC_SERVER_DISCOVERY (1 << 1)
-->
<method name="SetActive">
<arg type="b" name="is_active" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
GetServerState
-->
<method name="GetServerState">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="u" name="state" direction="out" />
</method>
IsConnected
-->
<method name="IsTagConnected">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="b" name="is_connected" direction="out" />
<arg type="i" name="dev_type" direction="out" />
GetInfo
-->
<method name="GetCurrentTagInfo">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="b" name="is_connected" direction="out" />
<arg type="u" name="handle" direction="out" />
GetBarcode
-->
<method name="GetBarcode">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="a(y)" name="barcode" direction="out" />
</method>
GetTagetHandle
-->
<method name="GetCurrentTargetHandle">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="b" name="is_connected" direction="out" />
<arg type="u" name="handle" direction="out" />
-->
<method name="Read">
<arg type="u" name="handle" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="a(y)" name="data" direction="out" />
</method>
<method name="Write">
<arg type="u" name="handle" direction="in" />
<arg type="a(y)" name="data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
-->
<method name="MakeReadOnly">
<arg type="u" name="handle" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<method name="Format">
<arg type="u" name="handle" direction="in" />
<arg type="a(y)" name="key" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
</interface>
-->
<method name="Config">
<arg type="(qqyy)" name="config" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<arg type="i" name="type" direction="in" />
<arg type="y" name="sap" direction="in" />
<arg type="s" name="service_name" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="u" name="client_socket" direction="out" />
</method>
<method name="Accept">
<arg type="u" name="handle" direction="in" />
<arg type="u" name="client_socket" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<method name="Reject">
<arg type="u" name="handle" direction="in" />
<arg type="u" name="client_socket" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<arg type="y" name="rw" direction="in" />
<arg type="i" name="type" direction="in" />
<arg type="s" name="service_name" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="u" name="client_socket" direction="out" />
</method>
<arg type="y" name="rw" direction="in" />
<arg type="i" name="type" direction="in" />
<arg type="y" name="sap" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="u" name="client_socket" direction="out" />
</method>
<arg type="u" name="handle" direction="in" />
<arg type="u" name="client_socket" direction="in" />
<arg type="a(y)" name="data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="u" name="client_socket" direction="out" />
</method>
<arg type="u" name="client_socket" direction="in" />
<arg type="y" name="sap" direction="in" />
<arg type="a(y)" name="data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="u" name="client_socket" direction="out" />
</method>
<arg type="u" name="handle" direction="in" />
<arg type="u" name="client_socket" direction="in" />
<arg type="u" name="request_length" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="a(y)" name="data" direction="out" />
</method>
<arg type="u" name="handle" direction="in" />
<arg type="u" name="client_socket" direction="in" />
<arg type="u" name="request_length" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="y" name="sap" direction="out" />
<arg type="a(y)" name="data" direction="out" />
<method name="Close">
<arg type="u" name="handle" direction="in" />
<arg type="u" name="client_socket" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="u" name="client_socket" direction="out" />
</method>
<method name="Disconnect">
<arg type="u" name="handle" direction="in" />
<arg type="u" name="client_socket" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="u" name="client_socket" direction="out" />
</method>
<arg type="i" name="type" direction="in" />
<arg type="a(y)" name="data" direction="in" />
<arg type="u" name="handle" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<method name="Set">
<arg type="i" name="state" direction="in" />
<arg type="i" name="focus_state" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
Get
-->
<method name="Get">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="i" name="state" direction="out" />
</method>
-->
<method name="Set">
<arg type="i" name="type" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
Get
-->
<method name="Get">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="i" name="type" direction="out" />
</method>
-->
<method name="SetCardEmulation">
<arg type="i" name="mode" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
GetCardEmulation
-->
<method name="GetCardEmulation">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="i" name="type" direction="out" />
</method>
-->
<method name="OpenSecureElement">
<arg type="i" name="type" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="u" name="handle" direction="out" />
</method>
-->
<method name="CloseSecureElement">
<arg type="u" name="handle" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
-->
<method name="GetAtr">
<arg type="u" name="handle" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="a(y)" name="atr" direction="out" />
</method>
<method name="SendAPDU">
<arg type="u" name="handle" direction="in" />
<arg type="a(y)" name="data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="a(y)" name="response" direction="out" />
</method>
-->
<method name="SetTransactionFgDispatch">
<arg type="i" name="mode" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<arg type="u" name="switch_on" direction="in" />
<arg type="u" name="switch_off" direction="in" />
<arg type="u" name="battery_off" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
-->
<method name="CheckTransactionPermission">
<arg type="a(y)" name="aid" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<method name="IsActivatedAidHandler">
<arg type="u" name="type" direction="in" />
<arg type="s" name="aid" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="b" name="activated" direction="out" />
</method>
<method name="IsActivatedCategoryHandler">
<arg type="u" name="type" direction="in" />
<arg type="u" name="category" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="b" name="activated" direction="out" />
</method>
<method name="GetRegisteredAids">
<arg type="u" name="type" direction="in" />
<arg type="u" name="category" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="a(sb)" name="aids" direction="out" />
</method>
<arg type="u" name="type" direction="in" />
<arg type="u" name="category" direction="in" />
<arg type="s" name="aid" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<arg type="u" name="type" direction="in" />
<arg type="u" name="category" direction="in" />
<arg type="s" name="aid" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<method name="UnregisterAids">
<arg type="u" name="type" direction="in" />
<arg type="u" name="category" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<arg type="u" name="category" direction="in" />
<arg type="b" name="unlock" direction="in" />
<arg type="u" name="power" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<method name="RemoveRouteAid">
<arg type="s" name="package" direction="in" />
<arg type="s" name="aid" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
-->
<method name="RemovePackageAids">
<arg type="s" name="package" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
-->
<method name="GetRegisteredHandlers">
<arg type="u" name="category" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="a(s)" name="packages" direction="out" />
</method>
<arg type="u" name="handle" direction="in" />
<arg type="u" name="dev_type" direction="in" />
<arg type="a(y)" name="data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="a(y)" name="resp_data" direction="out" />
</method>
<arg type="u" name="handle" direction="in" />
<arg type="u" name="dev_type" direction="in" />
<arg type="a(y)" name="data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
</interface>
<method name="Request">
<arg type="u" name="handle" direction="in" />
<arg type="i" name="type" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="i" name="carrier_type" direction="out" />
<arg type="a(y)" name="handover_data" direction="out" />
SimTest
-->
<method name="SimTest">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<method name="PrbsTest">
<arg type="u" name="tech" direction="in" />
<arg type="u" name="rate" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
GetFirmwareVersion
-->
<method name="GetFirmwareVersion">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="s" name="version" direction="out" />
</method>
<arg type="u" name="mode" direction="in" />
<arg type="u" name="reg_id" direction="in" />
<arg type="a(y)" name="data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
eseTest
-->
<method name="EseTest">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<method name="SetSeTechType">
<arg type="u" name="type" direction="in" />
<arg type="u" name="tech" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
</interface>
<arg type="u" name="sap" direction="in" />
<arg type="s" name="san" direction="in" />
<arg type="u" name="user_data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<method name="ServerUnregister">
<arg type="u" name="sap" direction="in" />
<arg type="s" name="san" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<arg type="u" name="sap" direction="in" />
<arg type="s" name="san" direction="in" />
<arg type="u" name="user_data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<arg type="u" name="sap" direction="in" />
<arg type="s" name="san" direction="in" />
<arg type="u" name="user_data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<arg type="u" name="snep_handle" direction="in" />
<arg type="u" name="type" direction="in" />
<arg type="a(y)" name="ndef_msg" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
<arg type="u" name="type" direction="out" />
<arg type="a(y)" name="data" direction="out" />
<method name="StopSnep">
<arg type="u" name="handle" direction="in" />
<arg type="u" name="snep_handle" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
StartHceHandler
-->
<method name="StartHceHandler">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
StopHceHandler
-->
<method name="StopHceHandler">
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
<method name="ResponseApdu">
<arg type="u" name="handle" direction="in" />
<arg type="a(y)" name="data" direction="in" />
- <arg type="a(y)" name="privilege" direction="in" />
<arg type="i" name="result" direction="out" />
</method>
ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
# for package file
-SET(dependents "aul glib-2.0 gio-unix-2.0 vconf dlog tapi appsvc libcurl bluetooth-api capi-network-bluetooth openssl deviced feedback capi-media-wav-player mm-keysound syspopup-caller notification capi-network-wifi capi-system-info sqlite3 libprivilege-control")
+SET(dependents "aul glib-2.0 gio-unix-2.0 vconf dlog tapi appsvc libcurl bluetooth-api capi-network-bluetooth openssl deviced feedback capi-media-wav-player mm-keysound syspopup-caller notification capi-network-wifi capi-system-info sqlite3 cynara-client cynara-creds-gdbus cynara-session")
#IF (TIZEN_TELEPHONY_ENABLED)
#MESSAGE("-DENABLE_TELEPHONY")
ADD_DEFINITIONS("-DUSE_FULL_URI")
#ADD_DEFINITIONS("-DESE_ALWAYS_ON")
+ADD_DEFINITIONS("-DUSE_CYNARA")
+
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
ADD_EXECUTABLE(${NFC_MANAGER_DAEMON} ${MANAGER_SRCS})
net_nfc_server_gdbus_on_client_detached_cb cb);
bool net_nfc_server_gdbus_check_privilege(GDBusMethodInvocation *invocation,
- GVariant *privilege,
- const char *object,
- const char *right);
+ net_nfc_privilege_e privilege);
void net_nfc_server_gdbus_add_client_context(const char *id,
client_state_e state);
#include <dbus/dbus-glib-bindings.h>
#include <gio/gio.h>
#include <sys/utsname.h>
-#include <privilege-control.h>
#include <vconf.h>
GError *error = NULL;
bool check_csc = 0;
- if (getuid() == 0)
- {
- int ret = perm_app_set_privilege("system", NULL, NULL);
- if(ret != 0)
- return 0;
- }
-
if (!g_thread_supported())
{
g_thread_init(NULL);
#include "net_nfc_server.h"
#include "net_nfc_server_context_internal.h"
+#ifdef USE_CYNARA
+#include "cynara-client.h"
+#include "cynara-creds-gdbus.h"
+#include "cynara-session.h"
+#endif
static GList *client_detached_cbs;
client_detached_cbs = g_list_remove(client_detached_cbs, cb);
}
-/* TODO */
-bool net_nfc_server_gdbus_check_privilege(GDBusMethodInvocation *invocation,
- GVariant *privilege,
- const char *object,
- const char *right)
+#ifdef USE_CYNARA
+static bool _get_credentials(GDBusMethodInvocation *invocation, net_nfc_privilege_e _privilege)
{
+ int ret = 0;
+ int pid = 0;
+ char *user;
+ char *client;
+ char *client_session;
+ char *privilege = NULL;
+ cynara *p_cynara = NULL;
+ const char *sender_unique_name;
+ GDBusConnection *connection;
+
+ connection = g_dbus_method_invocation_get_connection(invocation);
+ sender_unique_name = g_dbus_method_invocation_get_sender(invocation);
+
+ ret = cynara_initialize(&p_cynara, NULL);
+ if (ret != CYNARA_API_SUCCESS) {
+ DEBUG_SERVER_MSG("cynara_initialize() failed");
+ return false;
+ }
+
+ ret = cynara_creds_gdbus_get_pid(connection, sender_unique_name, &pid);
+ if (ret != CYNARA_API_SUCCESS) {
+ DEBUG_SERVER_MSG("cynara_creds_gdbus_get_pid() failed");
+ return false;
+ }
+
+ ret = cynara_creds_gdbus_get_user(connection, sender_unique_name, USER_METHOD_DEFAULT, &user);
+ if (ret != CYNARA_API_SUCCESS) {
+ DEBUG_SERVER_MSG("cynara_creds_gdbus_get_user() failed");
+ return false;
+ }
+
+ ret = cynara_creds_gdbus_get_client(connection, sender_unique_name, CLIENT_METHOD_DEFAULT, &client);
+ if (ret != CYNARA_API_SUCCESS) {
+ DEBUG_SERVER_MSG("cynara_creds_gdbus_get_client() failed");
+ return false;
+ }
+
+ switch (_privilege)
+ {
+ case NET_NFC_PRIVILEGE_NFC:
+ privilege = "http://tizen.org/privilege/nfc";
+ break;
+
+ case NET_NFC_PRIVILEGE_NFC_ADMIN :
+ privilege = "http://tizen.org/privilege/nfc.admin";
+ break;
+
+ case NET_NFC_PRIVILEGE_NFC_TAG :
+ privilege = "http://tizen.org/privilege/nfc";
+ break;
+
+ case NET_NFC_PRIVILEGE_NFC_P2P :
+ privilege = "http://tizen.org/privilege/nfc";
+ break;
+
+ case NET_NFC_PRIVILEGE_NFC_CARD_EMUL :
+ privilege = "http://tizen.org/privilege/nfc.cardemulation";
+ break;
+ default :
+ DEBUG_SERVER_MSG("Undifined privilege");
+ return false;
+ break;
+ }
+
+ DEBUG_SERVER_MSG("user :%s , client :%s ,unique_name : %s, pid() : %d, privilege : %d",
+ user, client, sender_unique_name, pid, privilege);
+
+ client_session = cynara_session_from_pid(pid);
+
+
+ ret = cynara_check(p_cynara, client, client_session, user, privilege);
+ if (ret == CYNARA_API_ACCESS_ALLOWED)
+ INFO_MSG("cynara PASS");
+
+ return (ret == CYNARA_API_ACCESS_ALLOWED) ? true : false;
+}
+#endif
+
+bool net_nfc_server_gdbus_check_privilege(GDBusMethodInvocation *invocation, net_nfc_privilege_e privilege)
+{
+ bool ret = true;
+
const char *id = g_dbus_method_invocation_get_sender(invocation);
- INFO_MSG("check the id of the gdbus sender = [%s]",id);
+ INFO_MSG("check the id of the gdbus sender = [%s]", id);
net_nfc_server_gdbus_add_client_context(id,
NET_NFC_CLIENT_ACTIVE_STATE);
- return true;
+#ifdef USE_CYNARA
+ ret = _get_credentials(invocation, privilege);
+#endif
+
+ return ret;
}
size_t net_nfc_server_gdbus_get_client_count_no_lock()
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
INFO_MSG(">>> REQUEST from [%s]",
g_dbus_method_invocation_get_sender(invocation));
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
INFO_MSG(">>> REQUEST from [%s]",
g_dbus_method_invocation_get_sender(invocation));
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
INFO_MSG(">>> REQUEST from [%s]",
g_dbus_method_invocation_get_sender(invocation));
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::admin",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_ADMIN) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::admin",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_ADMIN) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::tag",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_TAG) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::tag",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_TAG) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::tag",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_TAG) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::tag",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_TAG) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::ese",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::ese",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::ese",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::card_emul",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
#if 0
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
#if 0
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
#if 0
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::admin",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_CARD_EMUL) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- arg_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- arg_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- arg_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- arg_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- arg_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- arg_privilege,
- "nfc-manager::p2p",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::common",
- "w") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::common",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::tag",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_TAG) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::tag",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_TAG) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::tag",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_TAG) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::p2p",
- "r") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
#if 0
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::tag",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;
g_dbus_method_invocation_get_sender(invocation));
/* check privilege and update client context */
- if (net_nfc_server_gdbus_check_privilege(invocation,
- smack_privilege,
- "nfc-manager::tag",
- "rw") == false) {
+ if (net_nfc_server_gdbus_check_privilege(invocation, NET_NFC_PRIVILEGE_NFC_P2P) == false) {
DEBUG_ERR_MSG("permission denied, and finished request");
result = NET_NFC_PERMISSION_DENIED;