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