chiark / gitweb /
499bc2120831b69f5e6758842753c5a8280e8175
[elogind.git] / src / basic / login-util.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 /***
3   Copyright © 2013 Zbigniew Jędrzejewski-Szmek
4 ***/
5
6 #include <string.h>
7
8 #include "login-util.h"
9 #include "string-util.h"
10
11 bool session_id_valid(const char *id) {
12
13         if (isempty(id))
14                 return false;
15
16         return id[strspn(id, LETTERS DIGITS)] == '\0';
17 }