diff options
author | Andrew Bartlett <abartlet@samba.org> | 2013-05-04 21:56:01 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-05-10 22:59:18 +1200 |
commit | fe22e5fe9522a54019b0fa982fbe8dcf78b4d71c (patch) | |
tree | 592124745030820dd49eb1474c2b5f5a68e36e2c /debian/patches | |
parent | 44737cca821cde2b3b2dbf5f63d2ba85eb95bb77 (diff) | |
download | samba-fe22e5fe9522a54019b0fa982fbe8dcf78b4d71c.tar.gz |
Allow a fully empty libreplace by using the system getpass()
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/0002-lib-replace-Allow-OS-vendor-to-assert-that-getpass-i.patch | 62 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 63 insertions, 0 deletions
diff --git a/debian/patches/0002-lib-replace-Allow-OS-vendor-to-assert-that-getpass-i.patch b/debian/patches/0002-lib-replace-Allow-OS-vendor-to-assert-that-getpass-i.patch new file mode 100644 index 0000000000..2063e9134a --- /dev/null +++ b/debian/patches/0002-lib-replace-Allow-OS-vendor-to-assert-that-getpass-i.patch @@ -0,0 +1,62 @@ +From adb5d56ca130fd2dbe94d49c631c25b288414516 Mon Sep 17 00:00:00 2001 +From: Andrew Bartlett <abartlet@samba.org> +Date: Tue, 20 Nov 2012 09:52:27 +1100 +Subject: [PATCH 2/8] lib/replace: Allow OS vendor to assert that getpass() is + not 8-char limited + +This allows libreplace to be a no-op on Linux. + +Ideally this would be a waf test, but this is difficult as we have +to fake up a full pty environment. For now, allow a distribution +to assert it manually. + +Andrew Bartlett +--- + lib/replace/wscript | 23 ++++++++++++++--------- + 1 file changed, 14 insertions(+), 9 deletions(-) + +diff --git a/lib/replace/wscript b/lib/replace/wscript +index 9dfa985..af527bc 100644 +--- a/lib/replace/wscript ++++ b/lib/replace/wscript +@@ -22,6 +22,10 @@ def set_options(opt): + opt.BUILTIN_DEFAULT('NONE') + opt.PRIVATE_EXTENSION_DEFAULT('') + opt.RECURSE('buildtools/wafsamba') ++ opt.add_option('--without-getpass-replacement', ++ help='disable getpass() replacement (this asserts that the host OS is like Linux, and has an unlimited-length getpass.', ++ action='store_true', dest='without_getpass_replacement', default=False) ++ + + @wafsamba.runonce + def configure(conf): +@@ -482,16 +486,17 @@ removeea setea + execute=True): + break + +- if conf.CHECK_FUNCS('getpass getpassphrase'): +- # if we have both, then we prefer getpassphrase +- conf.DEFINE('REPLACE_GETPASS_BY_GETPASSPHRASE', 1) +- conf.DEFINE('REPLACE_GETPASS', 1) +- else: +- conf.CHECK_CODE('''#include "getpass.c" ++ if not Options.options.without_getpass_replacement: ++ if conf.CHECK_FUNCS('getpass getpassphrase'): ++ # if we have both, then we prefer getpassphrase ++ conf.DEFINE('REPLACE_GETPASS_BY_GETPASSPHRASE', 1) ++ conf.DEFINE('REPLACE_GETPASS', 1) ++ else: ++ conf.CHECK_CODE('''#include "getpass.c" + int main(void) { return 0; }''', +- addmain=False, +- define='REPLACE_GETPASS', +- cflags='-DNO_CONFIG_H') ++ addmain=False, ++ define='REPLACE_GETPASS', ++ cflags='-DNO_CONFIG_H') + + conf.RECURSE('system') + conf.SAMBA_CONFIG_H() +-- +1.7.11.7 + diff --git a/debian/patches/series b/debian/patches/series index 35c409aab4..33515d1d46 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ +0002-lib-replace-Allow-OS-vendor-to-assert-that-getpass-i.patch 01_no_private_lib_suffix.diff 05_share_ldb_module 07_private_lib |