summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-10-23 18:52:53 +0200
committerLennart Poettering <lennart@poettering.net>2015-10-24 23:04:42 +0200
commit4f5dd3943bef8a04be7e3b838b822bb9a7ad6cb3 (patch)
treededa3509752ff079dded29c145e4a8fae41812f1 /src/login
parentdea7b6b043f0cd9e34ee719b9b612c3a4776387e (diff)
util: split out escaping code into escape.[ch]
This really deserves its own file, given how much code this is now.
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-acl.c7
-rw-r--r--src/login/logind-dbus.c28
-rw-r--r--src/login/logind-inhibit.c7
-rw-r--r--src/login/logind-session.c16
-rw-r--r--src/login/logind-user.c27
5 files changed, 46 insertions, 39 deletions
diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c
index 466225d69c..c325c7bc0c 100644
--- a/src/login/logind-acl.c
+++ b/src/login/logind-acl.c
@@ -22,12 +22,13 @@
#include <errno.h>
#include <string.h>
-#include "util.h"
-#include "formats-util.h"
#include "acl-util.h"
+#include "escape.h"
+#include "formats-util.h"
#include "set.h"
-#include "logind-acl.h"
#include "udev-util.h"
+#include "util.h"
+#include "logind-acl.h"
static int flush_acl(acl_t acl) {
acl_entry_t i;
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index aeedf68e77..66807b3894 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -20,29 +20,31 @@
***/
#include <errno.h>
+#include <pwd.h>
#include <string.h>
#include <unistd.h>
-#include <pwd.h>
#include "sd-messages.h"
-#include "strv.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "special.h"
-#include "sleep-config.h"
-#include "fileio-label.h"
-#include "unit-name.h"
+
#include "audit.h"
-#include "bus-util.h"
-#include "bus-error.h"
#include "bus-common-errors.h"
-#include "udev-util.h"
-#include "selinux-util.h"
+#include "bus-error.h"
+#include "bus-util.h"
#include "efivars.h"
-#include "logind.h"
+#include "escape.h"
+#include "fileio-label.h"
#include "formats-util.h"
+#include "logind.h"
+#include "mkdir.h"
+#include "path-util.h"
#include "process-util.h"
+#include "selinux-util.h"
+#include "sleep-config.h"
+#include "special.h"
+#include "strv.h"
#include "terminal-util.h"
+#include "udev-util.h"
+#include "unit-name.h"
#include "utmp-wtmp.h"
int manager_get_session_from_creds(Manager *m, sd_bus_message *message, const char *name, sd_bus_error *error, Session **ret) {
diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c
index 0c9c1e5e97..7c7dd3ecb2 100644
--- a/src/login/logind-inhibit.c
+++ b/src/login/logind-inhibit.c
@@ -24,11 +24,12 @@
#include <string.h>
#include <unistd.h>
-#include "util.h"
-#include "mkdir.h"
-#include "logind-inhibit.h"
+#include "escape.h"
#include "fileio.h"
#include "formats-util.h"
+#include "mkdir.h"
+#include "util.h"
+#include "logind-inhibit.h"
Inhibitor* inhibitor_new(Manager *m, const char* id) {
Inhibitor *i;
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index fa82e444ef..e35b5e71a1 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -21,24 +21,26 @@
#include <errno.h>
#include <fcntl.h>
-#include <linux/vt.h>
#include <linux/kd.h>
+#include <linux/vt.h>
#include <signal.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include "sd-messages.h"
-#include "util.h"
-#include "mkdir.h"
-#include "path-util.h"
-#include "fileio.h"
+
#include "audit.h"
-#include "bus-util.h"
#include "bus-error.h"
-#include "logind-session.h"
+#include "bus-util.h"
+#include "escape.h"
+#include "fileio.h"
#include "formats-util.h"
+#include "mkdir.h"
+#include "path-util.h"
#include "terminal-util.h"
+#include "util.h"
+#include "logind-session.h"
#define RELEASE_USEC (20*USEC_PER_SEC)
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
index 451954e860..ecfbf2c5cc 100644
--- a/src/login/logind-user.c
+++ b/src/login/logind-user.c
@@ -19,26 +19,27 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <sys/mount.h>
+#include <errno.h>
#include <string.h>
+#include <sys/mount.h>
#include <unistd.h>
-#include <errno.h>
-#include "util.h"
-#include "mkdir.h"
-#include "rm-rf.h"
-#include "hashmap.h"
-#include "fileio.h"
-#include "path-util.h"
-#include "special.h"
-#include "unit-name.h"
-#include "bus-util.h"
#include "bus-error.h"
-#include "conf-parser.h"
+#include "bus-util.h"
#include "clean-ipc.h"
-#include "smack-util.h"
+#include "conf-parser.h"
+#include "escape.h"
+#include "fileio.h"
#include "formats-util.h"
+#include "hashmap.h"
#include "label.h"
+#include "mkdir.h"
+#include "path-util.h"
+#include "rm-rf.h"
+#include "smack-util.h"
+#include "special.h"
+#include "unit-name.h"
+#include "util.h"
#include "logind-user.h"
User* user_new(Manager *m, uid_t uid, gid_t gid, const char *name) {