]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ss: make SELinux stub functions conformant to API definitions
authorAndrea Claudi <aclaudi@redhat.com>
Wed, 23 Aug 2023 17:30:00 +0000 (19:30 +0200)
committerDavid Ahern <dsahern@kernel.org>
Fri, 25 Aug 2023 00:34:14 +0000 (17:34 -0700)
getfilecon() and security_get_initial_context() use the const qualifier
for their first paramater in SELinux APIs.

This commit adds the const qualifier to these functions, making them
conformant to API definitions.

Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
misc/ss.c

index 007cb3490760c85e78e009994424e00758ca62bd..b3183630fdac89c5643afa437afc2556ff796424 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -86,13 +86,13 @@ static int getpidcon(pid_t pid, char **context)
        return -1;
 }
 
-static int getfilecon(char *path, char **context)
+static int getfilecon(const char *path, char **context)
 {
        *context = NULL;
        return -1;
 }
 
-static int security_get_initial_context(char *name,  char **context)
+static int security_get_initial_context(const char *name,  char **context)
 {
        *context = NULL;
        return -1;