[gnome-keyring] pam: Stop using deprecated <selinux/flask.h> header



commit 74fc065e3c3e04a5cd5dfa0e725f7664825a5b1e
Author: Stef Walter <stefw gnome org>
Date:   Tue Oct 13 09:06:52 2015 +0200

    pam: Stop using deprecated <selinux/flask.h> header
    
    And use the more complex function call instead.
    
    Fixes this warning:
    
    /usr/include/selinux/flask.h:5:2: error: #warning "Please remove any #include's of this header in your 
source code." [-Werror=cpp]
     #warning "Please remove any #include's of this header in your source code."
      ^

 pam/gkr-pam-module.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/pam/gkr-pam-module.c b/pam/gkr-pam-module.c
index 686a948..38dba64 100644
--- a/pam/gkr-pam-module.c
+++ b/pam/gkr-pam-module.c
@@ -311,7 +311,6 @@ cleanup_free_password (pam_handle_t *ph, void *data, int pam_end_status)
 }
 
 #ifdef WITH_SELINUX
-#include  <selinux/flask.h>
 #include  <selinux/selinux.h>
 /* Attempt to set SELinux Context. We are ignoring failure and just going
    with default behaviour
@@ -327,7 +326,7 @@ static void setup_selinux_context(const char *command) {
        ret = getfilecon(command, &fcon);
        if (ret < 0) goto err;
 
-       ret = security_compute_create(execcon, fcon, SECCLASS_PROCESS, &newcon);
+       ret = security_compute_create(execcon, fcon, string_to_security_class ("process"), &newcon);
        if (ret < 0) goto err;
 
        setexeccon(newcon);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]