chiark / gitweb /
d69b413e6e0b933bcd048a950fda78ee927524b2
[elogind.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 }