swrap: Add SOCKET_WRAPPER_DIR_ALLOW_ORIG to allow fall back
authorMartin Schwenke <martin@meltin.net>
Thu, 14 May 2020 00:01:54 +0000 (10:01 +1000)
committerStefan Metzmacher <metze@samba.org>
Mon, 22 Jun 2020 14:44:22 +0000 (16:44 +0200)
commit19c3e87570954cb7fb4f6c105cbec9eabf4539b0
tree4c3de2ef51a958af76def34e02a24e8b364d327e
parentdd428959713998d3f973bcf2762d489ef27d9f13
swrap: Add SOCKET_WRAPPER_DIR_ALLOW_ORIG to allow fall back

Instead of failing when the path returned by realpath(3) is too long,
if SOCKET_WRAPPER_DIR_ALLOW_ORIG is set then fall back to the
original value.  If this original path is too long or something else
fails then abort.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
src/socket_wrapper.c