commit e606a30f85f5d02eaea46c9880f760770a62f60e
parent 9a25a6d7b6be3ed4ffb822c5a3fa178057d18329
Author: kocotian <kocotian@kocotian.pl>
Date: Tue, 9 Feb 2021 10:39:41 +0100
prompt, force timestamp
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/LICENSE b/LICENSE
@@ -1,6 +1,7 @@
Copyright (c) 2015 Ted Unangst
Copyright (c) 2015 Nathan Holstein
Copyright (c) 2016 Duncan Overbruck
+Copyright (c) 2021 Kacper Kocot
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
diff --git a/pam.c b/pam.c
@@ -237,6 +237,7 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p
pid_t child;
int ret, sess = 0, cred = 0;
+#define USE_TIMESTAMP
#ifdef USE_TIMESTAMP
int fd = -1;
int valid = 0;
@@ -284,7 +285,7 @@ pamauth(const char *user, const char *myname, int interactive, int nopass, int p
if (gethostname(host, sizeof(host)))
snprintf(host, sizeof(host), "?");
snprintf(doas_prompt, sizeof(doas_prompt),
- "\rdoas (%.32s@%.32s) password: ", myname, host);
+ "\r\033[1;34m:: \033[0m[\033[1mdoas\033[0m] \033[1mpassword for \033[1;37m%.32s@%.32s\033[0;1m: \033[0m", myname, host);
/* authenticate */
ret = pam_authenticate(pamh, 0);