The Samba-Bugzilla – Attachment 17172 Details for
Bug 13631
DFS fix for AIX broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
backported patch for 4.14, 4.15 and 4.16
readlink.patch (text/plain), 2.73 KB, created by
Björn Jacke
on 2022-02-19 22:35:36 UTC
(
hide
)
Description:
backported patch for 4.14, 4.15 and 4.16
Filename:
MIME Type:
Creator:
Björn Jacke
Created:
2022-02-19 22:35:36 UTC
Size:
2.73 KB
patch
obsolete
>From 038c784a7807d6b2b2bb9ed940c534ba48dd7248 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de> >Date: Wed, 26 Dec 2018 01:01:14 +0100 >Subject: [PATCH 1/2] readlink test: inverse return code > >We need to return 0 in case readlink is *broken* here - this is because our waf >CHECK_CODE function does only allow generating defines in case the test succeeds > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13631 > >Signed-off-by: Bjoern Jacke <bj@sernet.de> >Reviewed-by: Jeremy Allison <jra@samba.org> >(cherry picked from commit e225ab70db0cc01454d319eaca5265d7e33f396c) >--- > tests/readlink.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/tests/readlink.c b/tests/readlink.c >index 65311c2ff79..a09eba4af2b 100644 >--- a/tests/readlink.c >+++ b/tests/readlink.c >@@ -1,4 +1,7 @@ >-/* test whether readlink returns a short buffer correctly. */ >+/* test whether readlink returns a short buffer incorrectly. >+ We need to return 0 in case readlink is *broken* here - this is because our waf >+ CHECK_CODE function does only allow generating defines in case the test succeeds >+*/ > > #if defined(HAVE_UNISTD_H) > #include <unistd.h> >@@ -20,14 +23,14 @@ int main(void) > unlink(FNAME); > ret = symlink(DATA, FNAME); > if (ret == -1) { >- exit(1); >+ exit(0); > } > > rl_ret = readlink(FNAME, buf, sizeof(buf)); > if (rl_ret == -1) { > unlink(FNAME); >- exit(1); >+ exit(0); > } > unlink(FNAME); >- exit(0); >+ exit(1); > } >-- >2.20.2 > > >From 37758de5fbc4dd9ae09fbae120d8a8a2e3ebd107 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de> >Date: Wed, 26 Dec 2018 01:03:29 +0100 >Subject: [PATCH 2/2] waf: re-add missing readlink test > >this was another portability regression that came with the moving to waf > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=13631 > >Signed-off-by: Bjoern Jacke <bj@sernet.de> >Reviewed-by: Jeremy Allison <jra@samba.org> > >Autobuild-User(master): Jeremy Allison <jra@samba.org> >Autobuild-Date(master): Fri Feb 18 23:12:51 UTC 2022 on sn-devel-184 > >(cherry picked from commit 45cb14ac80889ac913f7f76dbfaebcb4d5ee14fd) >--- > source3/wscript | 6 ++++++ > 1 file changed, 6 insertions(+) > >diff --git a/source3/wscript b/source3/wscript >index c28aff1a68c..acdbfaf1215 100644 >--- a/source3/wscript >+++ b/source3/wscript >@@ -1389,6 +1389,12 @@ main() { > addmain=False, > execute=True) > >+ conf.CHECK_CODE('''#include "../tests/readlink.c"''', >+ 'HAVE_BROKEN_READLINK', >+ msg='Checking for readlink breakage', >+ addmain=False, >+ execute=True) >+ > conf.SET_TARGET_TYPE('sendfile', 'EMPTY') > conf.CHECK_LIB('sendfile') > if not Options.options.with_sendfile_support == False: >-- >2.20.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
metze
:
review+
Actions:
View
Attachments on
bug 13631
: 17172