Line data Source code
1 : /* SPDX-License-Identifier: LGPL-2.1+ */ 2 : 3 : #include <string.h> 4 : 5 : #include "login-util.h" 6 : #include "string-util.h" 7 : 8 189 : bool session_id_valid(const char *id) { 9 : 10 189 : if (isempty(id)) 11 2 : return false; 12 : 13 187 : return id[strspn(id, LETTERS DIGITS)] == '\0'; 14 : }