summaryrefslogtreecommitdiff
path: root/lib/semanage.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/semanage.c')
-rw-r--r--lib/semanage.c35
1 files changed, 7 insertions, 28 deletions
diff --git a/lib/semanage.c b/lib/semanage.c
index 766ad6d0..12401608 100644
--- a/lib/semanage.c
+++ b/lib/semanage.c
@@ -1,31 +1,8 @@
/*
- * Copyright (c) 2010 , Jakub Hrozek <jhrozek@redhat.com>
- * Copyright (c) 2011 , Peter Vrabec <pvrabec@redhat.com>
- * All rights reserved.
+ * SPDX-FileCopyrightText: 2010 , Jakub Hrozek <jhrozek@redhat.com>
+ * SPDX-FileCopyrightText: 2011 , Peter Vrabec <pvrabec@redhat.com>
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the copyright holders or contributors may not be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
- * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * SPDX-License-Identifier: BSD-3-Clause
*/
#include <config.h>
@@ -43,6 +20,7 @@
#include <semanage/semanage.h>
#include "prototypes.h"
+#include "shadowlog_internal.h"
#ifndef DEFAULT_SERANGE
#define DEFAULT_SERANGE "s0"
@@ -293,6 +271,7 @@ int set_seuser (const char *login_name, const char *seuser_name)
}
ret = 0;
+ reset_selinux_handle();
done:
semanage_seuser_key_free (key);
@@ -331,7 +310,7 @@ int del_seuser (const char *login_name)
if (0 == exists) {
fprintf (shadow_logfd,
- _("Login mapping for %s is not defined, OK if default mapping was used\n"),
+ _("Login mapping for %s is not defined, OK if default mapping was used\n"),
login_name);
ret = 0; /* probably default mapping */
goto done;
@@ -346,7 +325,7 @@ int del_seuser (const char *login_name)
if (0 == exists) {
fprintf (shadow_logfd,
- _("Login mapping for %s is defined in policy, cannot be deleted\n"),
+ _("Login mapping for %s is defined in policy, cannot be deleted\n"),
login_name);
ret = 0; /* Login mapping defined in policy can't be deleted */
goto done;