libsmb: Change cli_posix_readlink to return talloc'ed target
authorVolker Lendecke <vl@samba.org>
Tue, 26 Mar 2019 08:48:16 +0000 (09:48 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 27 Mar 2019 12:31:37 +0000 (12:31 +0000)
commit3e1d8ab1255f1797a1803494b6333dc7990e0795
tree068805c74fb947f5a8958e428543ff523c554d12
parent3478e9d124f95344d67f1794e92658fa253b48fd
libsmb: Change cli_posix_readlink to return talloc'ed target

This is a deviation from the Posix readlink function that from my
point of view makes this function easier to use. In Posix, probably
the assumption is that readlink is cheap, so someone under memory
constraints could just start with a small buffer and incrementally
increase the buffer size. For us, it's a network round-trip, and we
have the luxury of [mt]alloc, which the syscall kernel interface does
not have.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 27 12:31:37 UTC 2019 on sn-devel-144
source3/client/client.c
source3/libsmb/clifile.c
source3/libsmb/proto.h
source3/torture/torture.c