1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

examples: Enable posix for teststat

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>
This commit is contained in:
Volker Lendecke 2023-09-14 13:45:04 +02:00 committed by Jeremy Allison
parent 6a4413c65c
commit 051492c178

View File

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