From: Volker Lendecke Date: Sun, 4 Dec 2022 11:16:39 +0000 (+0100) Subject: smbd: Simplify symlink_target_below_conn() X-Git-Tag: talloc-2.4.0~394 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ea1af287eef832641464c6f764ea84a484a06f7;p=thirdparty%2Fsamba.git smbd: Simplify symlink_target_below_conn() readlink_talloc() deals exactly the same way with a NULL relname Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Mon Dec 5 16:06:51 UTC 2022 on sn-devel-184 --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 0081f454ed8..5c26ea190ff 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -588,11 +588,7 @@ static NTSTATUS symlink_target_below_conn( * fsp is an O_PATH open, Linux does a "freadlink" * with an empty name argument to readlinkat */ - struct smb_filename null_fname = { - .base_name = discard_const_p(char, ""), - }; - status = readlink_talloc( - talloc_tos(), fsp, &null_fname, &target); + status = readlink_talloc(talloc_tos(), fsp, NULL, &target); } else { status = readlink_talloc( talloc_tos(), dirfsp, symlink_name, &target);