]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/nspawn/nspawn-setuid.c
tree-wide: drop 'This file is part of systemd' blurb
[thirdparty/systemd.git] / src / nspawn / nspawn-setuid.c
index 80189ac6dbd344508c1e9334cd93bf5b2cd07a7f..8f92608bdc751651bfc89acdebf41db26d9ab076 100644 (file)
@@ -1,21 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 /***
-  This file is part of systemd.
-
   Copyright 2015 Lennart Poettering
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
 #include <grp.h>
@@ -243,10 +228,8 @@ int change_uid_gid(const char *user, char **_home) {
         if (setresuid(uid, uid, uid) < 0)
                 return log_error_errno(errno, "setresuid() failed: %m");
 
-        if (_home) {
-                *_home = home;
-                home = NULL;
-        }
+        if (_home)
+                *_home = TAKE_PTR(home);
 
         return 0;
 }