mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 08:56:15 +09:00
18 lines
368 B
C
18 lines
368 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
|
|
#include "path-util.h"
|
|
#include "sysupdate-util.h"
|
|
|
|
bool version_is_valid(const char *s) {
|
|
if (isempty(s))
|
|
return false;
|
|
|
|
if (!filename_is_valid(s))
|
|
return false;
|
|
|
|
if (!in_charset(s, ALPHANUMERICAL ".,_-+"))
|
|
return false;
|
|
|
|
return true;
|
|
}
|