summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/readpassphrase.c3
-rw-r--r--lib/libc/hidden/readpassphrase.h25
2 files changed, 27 insertions, 1 deletions
diff --git a/lib/libc/gen/readpassphrase.c b/lib/libc/gen/readpassphrase.c
index 6854617591c..3837b0881de 100644
--- a/lib/libc/gen/readpassphrase.c
+++ b/lib/libc/gen/readpassphrase.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: readpassphrase.c,v 1.24 2013/11/24 23:51:29 deraadt Exp $ */
+/* $OpenBSD: readpassphrase.c,v 1.25 2015/09/14 10:45:27 guenther Exp $ */
/*
* Copyright (c) 2000-2002, 2007, 2010
@@ -171,6 +171,7 @@ restart:
errno = save_errno;
return(nr == -1 ? NULL : buf);
}
+DEF_WEAK(readpassphrase);
char *
getpass(const char *prompt)
diff --git a/lib/libc/hidden/readpassphrase.h b/lib/libc/hidden/readpassphrase.h
new file mode 100644
index 00000000000..24c15636aaa
--- /dev/null
+++ b/lib/libc/hidden/readpassphrase.h
@@ -0,0 +1,25 @@
+/* $OpenBSD: readpassphrase.h,v 1.1 2015/09/14 10:45:27 guenther Exp $ */
+/*
+ * Copyright (c) 2015 Philip Guenther <guenther@openbsd.org>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef _LIBC_READPASSPHRASE_H_
+#define _LIBC_READPASSPHRASE_H_
+
+#include_next <readpassphrase.h>
+
+PROTO_NORMAL(readpassphrase);
+
+#endif /* !_LIBC_READPASSPHRASE_H_ */