d_printf("posix_open <filename> 0<mode>\n");
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"posix_open\" command can be used.\n");
+ return 1;
+ }
mode = (mode_t)strtol(buf, (char **)NULL, 8);
status = cli_resolve_path(ctx, "",
d_printf("posix_mkdir <filename> 0<mode>\n");
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"posix_mkdir\" command can be used.\n");
+ return 1;
+ }
mode = (mode_t)strtol(buf, (char **)NULL, 8);
status = cli_resolve_path(ctx, "",
d_printf("posix_unlink <filename>\n");
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"posix_unlink\" command can be used.\n");
+ return 1;
+ }
mask = talloc_asprintf(ctx,
"%s%s",
client_get_cur_dir(),
d_printf("posix_rmdir <filename>\n");
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"posix_rmdir\" command can be used.\n");
+ return 1;
+ }
mask = talloc_asprintf(ctx,
"%s%s",
client_get_cur_dir(),
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"lock\" command can be used.\n");
+ return 1;
+ }
+
len = (uint64_t)strtol(buf, (char **)NULL, 16);
status = cli_posix_lock(cli, fnum, start, len, true, lock_type);
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"unlock\" command can be used.\n");
+ return 1;
+ }
+
len = (uint64_t)strtol(buf, (char **)NULL, 16);
status = cli_posix_unlock(cli, fnum, start, len);
bool guest = false;
uint32_t i;
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"posix_whoami\" command can be used.\n");
+ return 1;
+ }
+
status = cli_posix_whoami(cli,
ctx,
&uid,
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"link\" command can be used.\n");
+ return 1;
+ }
+
status = cli_posix_hardlink(targetcli, targetname, newname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("%s linking files (%s -> %s)\n",
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"readlink\" command can be used.\n");
+ return 1;
+ }
+
status = cli_posix_readlink(targetcli, name, talloc_tos(), &linkname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("%s readlink on file %s\n",
link_target = buf;
if (SERVER_HAS_UNIX_CIFS(cli)) {
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"symlink\" command can be used.\n");
+ return 1;
+ }
newname = talloc_asprintf(ctx, "%s%s", client_get_cur_dir(),
buf2);
if (!newname) {
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"chmod\" command can be used.\n");
+ return 1;
+ }
+
status = cli_posix_chmod(targetcli, targetname, mode);
if (!NT_STATUS_IS_OK(status)) {
d_printf("%s chmod file %s 0%o\n",
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"getfacl\" command can be used.\n");
+ return 1;
+ }
+
status = cli_unix_extensions_version(targetcli, &major, &minor,
&caplow, &caphigh);
if (!NT_STATUS_IS_OK(status)) {
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"stat\" command can be used.\n");
+ return 1;
+ }
+
status = cli_posix_stat(targetcli, targetname, &sbuf);
if (!NT_STATUS_IS_OK(status)) {
d_printf("%s stat file %s\n",
return 1;
}
+ if (CLI_DIRSEP_CHAR != '/') {
+ d_printf("Command \"posix\" must be issued before "
+ "the \"chown\" command can be used.\n");
+ return 1;
+ }
+
status = cli_posix_chown(targetcli, targetname, uid, gid);
if (!NT_STATUS_IS_OK(status)) {
d_printf("%s chown file %s uid=%d, gid=%d\n",