@@ -921,12 +921,12 @@ static void socket_apply_socket_options(Socket *s, int fd) {
921921 }
922922
923923 if (s -> smack_ip_in )
924- if (smack_label_ip_in_fd (fd , s -> smack_ip_in ) < 0 )
925- log_error_unit (UNIT (s )-> id , "smack_label_ip_in_fd : %m" );
924+ if (mac_smack_set_ip_in_fd (fd , s -> smack_ip_in ) < 0 )
925+ log_error_unit (UNIT (s )-> id , "mac_smack_set_ip_in_fd : %m" );
926926
927927 if (s -> smack_ip_out )
928- if (smack_label_ip_out_fd (fd , s -> smack_ip_out ) < 0 )
929- log_error_unit (UNIT (s )-> id , "smack_label_ip_out_fd : %m" );
928+ if (mac_smack_set_ip_out_fd (fd , s -> smack_ip_out ) < 0 )
929+ log_error_unit (UNIT (s )-> id , "mac_smack_set_ip_out_fd : %m" );
930930}
931931
932932static void socket_apply_fifo_options (Socket * s , int fd ) {
@@ -939,8 +939,8 @@ static void socket_apply_fifo_options(Socket *s, int fd) {
939939 "F_SETPIPE_SZ: %m" );
940940
941941 if (s -> smack )
942- if (smack_label_fd (fd , s -> smack ) < 0 )
943- log_error_unit (UNIT (s )-> id , "smack_label_fd : %m" );
942+ if (mac_smack_set_fd (fd , s -> smack ) < 0 )
943+ log_error_unit (UNIT (s )-> id , "mac_smack_set_fd : %m" );
944944}
945945
946946static int fifo_address_create (
@@ -958,7 +958,7 @@ static int fifo_address_create(
958958
959959 mkdir_parents_label (path , directory_mode );
960960
961- r = label_context_set (path , S_IFIFO );
961+ r = mac_selinux_context_set (path , S_IFIFO );
962962 if (r < 0 )
963963 goto fail ;
964964
@@ -981,7 +981,7 @@ static int fifo_address_create(
981981 goto fail ;
982982 }
983983
984- label_context_clear ();
984+ mac_selinux_context_clear ();
985985
986986 if (fstat (fd , & st ) < 0 ) {
987987 r = - errno ;
@@ -1001,7 +1001,7 @@ static int fifo_address_create(
10011001 return 0 ;
10021002
10031003fail :
1004- label_context_clear ();
1004+ mac_selinux_context_clear ();
10051005 safe_close (fd );
10061006
10071007 return r ;
@@ -1131,7 +1131,7 @@ static int socket_open_fds(Socket *s) {
11311131
11321132 if (p -> type == SOCKET_SOCKET ) {
11331133 if (!know_label && s -> selinux_context_from_net ) {
1134- r = label_get_our_label (& label );
1134+ r = mac_selinux_get_our_label (& label );
11351135 if (r < 0 )
11361136 return r ;
11371137 know_label = true;
@@ -1143,7 +1143,7 @@ static int socket_open_fds(Socket *s) {
11431143
11441144 if (UNIT_ISSET (s -> service ) &&
11451145 SERVICE (UNIT_DEREF (s -> service ))-> exec_command [SERVICE_EXEC_START ]) {
1146- r = label_get_create_label_from_exe (SERVICE (UNIT_DEREF (s -> service ))-> exec_command [SERVICE_EXEC_START ]-> path , & label );
1146+ r = mac_selinux_get_create_label_from_exe (SERVICE (UNIT_DEREF (s -> service ))-> exec_command [SERVICE_EXEC_START ]-> path , & label );
11471147 if (r < 0 && r != - EPERM )
11481148 return r ;
11491149 }
@@ -1204,12 +1204,12 @@ static int socket_open_fds(Socket *s) {
12041204 assert_not_reached ("Unknown port type" );
12051205 }
12061206
1207- label_free (label );
1207+ mac_selinux_free (label );
12081208 return 0 ;
12091209
12101210rollback :
12111211 socket_close_fds (s );
1212- label_free (label );
1212+ mac_selinux_free (label );
12131213 return r ;
12141214}
12151215
0 commit comments