]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/test/test-ask-password-api.c
tree-wide: various ubsan zero size memory fixes
[thirdparty/systemd.git] / src / test / test-ask-password-api.c
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2
3 #include "alloc-util.h"
4 #include "ask-password-api.h"
5 #include "log.h"
6
7 static void ask_password(void) {
8 int r;
9 _cleanup_free_ char *ret;
10
11 r = ask_password_tty(-1, "hello?", "da key", 0, 0, NULL, &ret);
12 assert(r >= 0);
13
14 log_info("Got %s", ret);
15 }
16
17 int main(int argc, char **argv) {
18 log_parse_environment();
19
20 ask_password();
21 }