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