chiark / gitweb /
execute: move suppression of HOME=/ and SHELL=/bin/nologin into user-util.c
authorLennart Poettering <lennart@poettering.net>
Thu, 25 Aug 2016 08:24:10 +0000 (10:24 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 5 Jul 2017 06:50:52 +0000 (08:50 +0200)
commit4d1a9dbea12127dd8fd8c0ee9a53b544ef92f6bf
tree17d048f65ade69fff65105f4efa0b18b9dcf48b7
parent9c228d40d338e0234e2a6392527615938ff12336
execute: move suppression of HOME=/ and SHELL=/bin/nologin into user-util.c

This adds a new call get_user_creds_clean(), which is just like
get_user_creds() but returns NULL in the home/shell parameters if they contain
no useful information. This code previously lived in execute.c, but by
generalizing this we can reuse it in run.c.
src/basic/user-util.c
src/basic/user-util.h