]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
examples: Enable posix for teststat
authorVolker Lendecke <vl@samba.org>
Thu, 14 Sep 2023 11:45:04 +0000 (13:45 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 12 Oct 2023 16:55:34 +0000 (16:55 +0000)
Show that we can properly detect non-regular files created by the
Windows NFS server. Tested manually against Windows 2022.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
examples/libsmbclient/teststat.c

index ae08504a2942baa8e9fed40c8dc0e222a7bb74e5..079ac8974ad87e092264da559a9c781e361f3d88 100644 (file)
@@ -3,6 +3,7 @@
 #include <string.h>
 #include <time.h>
 #include <libsmbclient.h>
+#include <stdbool.h>
 #include "get_auth_data_fn.h"
 
 static const char *filetypestr(mode_t mode)
@@ -71,6 +72,7 @@ int main(int argc, char * argv[])
        smbc_setDebug(ctx, debug);
        smbc_init_context(ctx);
        smbc_setFunctionAuthData(ctx, get_auth_data_fn);
+       smbc_setOptionPosixExtensions(ctx, true);
 
        ret = smbc_getFunctionStat(ctx)(ctx, pSmbPath, &st);
        if (ret < 0) {