cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
- /* Check cli_setpathinfo_basic() */
+ /* Check cli_setpathinfo_ext() */
/* Re-create the file. */
status = cli_openx(cli, fname,
O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum);
}
cli_close(cli, fnum);
- status = cli_setpathinfo_basic(cli,
- fname,
- 0, /* create */
- 0, /* access */
- 0, /* write */
- 0, /* change */
- FILE_ATTRIBUTE_SYSTEM |
- FILE_ATTRIBUTE_HIDDEN |
- FILE_ATTRIBUTE_READONLY);
- if (!NT_STATUS_IS_OK(status)) {
- printf("cli_setpathinfo_basic failed with %s\n",
+ status = cli_setpathinfo_ext(
+ cli,
+ fname,
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* create */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* access */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* write */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* change */
+ FILE_ATTRIBUTE_SYSTEM |
+ FILE_ATTRIBUTE_HIDDEN |
+ FILE_ATTRIBUTE_READONLY);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("cli_setpathinfo_ext failed with %s\n",
nt_errstr(status));
correct = false;
}
}
/* Setting to FILE_ATTRIBUTE_NORMAL should be ignored. */
- status = cli_setpathinfo_basic(cli,
- fname,
- 0, /* create */
- 0, /* access */
- 0, /* write */
- 0, /* change */
- FILE_ATTRIBUTE_NORMAL);
- if (!NT_STATUS_IS_OK(status)) {
- printf("cli_setpathinfo_basic failed with %s\n",
+ status = cli_setpathinfo_ext(
+ cli,
+ fname,
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* create */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* access */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* write */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* change */
+ FILE_ATTRIBUTE_NORMAL);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("cli_setpathinfo_ext failed with %s\n",
nt_errstr(status));
correct = false;
}
}
/* Setting to (uint16_t)-1 should also be ignored. */
- status = cli_setpathinfo_basic(cli,
- fname,
- 0, /* create */
- 0, /* access */
- 0, /* write */
- 0, /* change */
- (uint16_t)-1);
- if (!NT_STATUS_IS_OK(status)) {
- printf("cli_setpathinfo_basic failed with %s\n",
+ status = cli_setpathinfo_ext(
+ cli,
+ fname,
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* create */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* access */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* write */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* change */
+ (uint16_t)-1);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("cli_setpathinfo_ext failed with %s\n",
nt_errstr(status));
correct = false;
}
}
/* Setting to 0 should clear them all. */
- status = cli_setpathinfo_basic(cli,
- fname,
- 0, /* create */
- 0, /* access */
- 0, /* write */
- 0, /* change */
- 0);
- if (!NT_STATUS_IS_OK(status)) {
- printf("cli_setpathinfo_basic failed with %s\n",
+ status = cli_setpathinfo_ext(
+ cli,
+ fname,
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* create */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* access */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* write */
+ (struct timespec) { .tv_nsec = SAMBA_UTIME_OMIT }, /* change */
+ 0);
+ if (!NT_STATUS_IS_OK(status)) {
+ printf("cli_setpathinfo_ext failed with %s\n",
nt_errstr(status));
correct = false;
}