]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/login-util.c
tree-wide: drop license boilerplate
[thirdparty/systemd.git] / src / basic / login-util.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 /***
3 This file is part of systemd.
4
5 Copyright 2013 Zbigniew Jędrzejewski-Szmek
6 ***/
7
8 #include <string.h>
9
10 #include "login-util.h"
11 #include "string-util.h"
12
13 bool session_id_valid(const char *id) {
14
15 if (isempty(id))
16 return false;
17
18 return id[strspn(id, LETTERS DIGITS)] == '\0';
19 }