Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
char *targetpath = NULL;
struct cli_state *targetcli = NULL;
SMB_STRUCT_STAT sbuf;
char *targetpath = NULL;
struct cli_state *targetcli = NULL;
SMB_STRUCT_STAT sbuf;
int ret = 1;
TALLOC_CTX *ctx = talloc_stackframe();
NTSTATUS status;
int ret = 1;
TALLOC_CTX *ctx = talloc_stackframe();
NTSTATUS status;
****************************************************************************/
NTSTATUS do_list(const char *mask,
****************************************************************************/
NTSTATUS do_list(const char *mask,
NTSTATUS (*fn)(struct cli_state *cli_state, struct file_info *,
const char *dir),
bool rec,
NTSTATUS (*fn)(struct cli_state *cli_state, struct file_info *,
const char *dir),
bool rec,
static int cmd_dir(void)
{
TALLOC_CTX *ctx = talloc_tos();
static int cmd_dir(void)
{
TALLOC_CTX *ctx = talloc_tos();
- uint16 attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+ uint16_t attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
char *mask = NULL;
char *buf = NULL;
int rc = 1;
char *mask = NULL;
char *buf = NULL;
int rc = 1;
static int cmd_du(void)
{
TALLOC_CTX *ctx = talloc_tos();
static int cmd_du(void)
{
TALLOC_CTX *ctx = talloc_tos();
- uint16 attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+ uint16_t attribute = FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
char *mask = NULL;
char *buf = NULL;
NTSTATUS status;
char *mask = NULL;
char *buf = NULL;
NTSTATUS status;
uint16_t fnum;
bool newhandle = false;
struct timespec tp_start;
uint16_t fnum;
bool newhandle = false;
struct timespec tp_start;
off_t size;
off_t start = 0;
off_t nread = 0;
off_t size;
off_t start = 0;
off_t nread = 0;
}
if (archive_level >= 2 && (attr & FILE_ATTRIBUTE_ARCHIVE)) {
}
if (archive_level >= 2 && (attr & FILE_ATTRIBUTE_ARCHIVE)) {
- cli_setatr(cli, rname, attr & ~(uint16)FILE_ATTRIBUTE_ARCHIVE, 0);
+ cli_setatr(cli, rname, attr & ~(uint16_t)FILE_ATTRIBUTE_ARCHIVE, 0);
static int cmd_mget(void)
{
TALLOC_CTX *ctx = talloc_tos();
static int cmd_mget(void)
{
TALLOC_CTX *ctx = talloc_tos();
- uint16 attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+ uint16_t attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
char *mget_mask = NULL;
char *buf = NULL;
NTSTATUS status = NT_STATUS_OK;
char *mget_mask = NULL;
char *buf = NULL;
NTSTATUS status = NT_STATUS_OK;
char *mask = NULL;
char *buf = NULL;
NTSTATUS status = NT_STATUS_OK;
char *mask = NULL;
char *buf = NULL;
NTSTATUS status = NT_STATUS_OK;
- uint16 attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
+ uint16_t attribute = FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN;
if (recurse) {
attribute |= FILE_ATTRIBUTE_DIRECTORY;
if (recurse) {
attribute |= FILE_ATTRIBUTE_DIRECTORY;
TALLOC_CTX *ctx = talloc_tos();
char *mask = NULL;
char *buf = NULL;
TALLOC_CTX *ctx = talloc_tos();
char *mask = NULL;
char *buf = NULL;
struct cli_state *targetcli;
char *targetname = NULL;
NTSTATUS status;
struct cli_state *targetcli;
char *targetname = NULL;
NTSTATUS status;
- attribute = (uint16)strtol(buf, (char **)NULL, 16);
+ attribute = (uint16_t)strtol(buf, (char **)NULL, 16);
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
d_printf("wdel 0x<attrib> <wcard>\n");
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
d_printf("wdel 0x<attrib> <wcard>\n");
static int cmd_posix(void)
{
TALLOC_CTX *ctx = talloc_tos();
static int cmd_posix(void)
{
TALLOC_CTX *ctx = talloc_tos();
- uint16 major, minor;
- uint32 caplow, caphigh;
+ uint16_t major, minor;
+ uint32_t caplow, caphigh;
char *caps;
NTSTATUS status;
char *caps;
NTSTATUS status;
char *name = NULL;
char *targetname = NULL;
struct cli_state *targetcli;
char *name = NULL;
char *targetname = NULL;
struct cli_state *targetcli;
- uint16 major, minor;
- uint32 caplow, caphigh;
+ uint16_t major, minor;
+ uint32_t caplow, caphigh;
char *retbuf = NULL;
size_t rb_size = 0;
SMB_STRUCT_STAT sbuf;
char *retbuf = NULL;
size_t rb_size = 0;
SMB_STRUCT_STAT sbuf;
- uint16 num_file_acls = 0;
- uint16 num_dir_acls = 0;
- uint16 i;
+ uint16_t num_file_acls = 0;
+ uint16_t num_dir_acls = 0;
+ uint16_t i;
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&name,NULL)) {
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&name,NULL)) {
}
for (i = 0; i < num_file_acls; i++) {
}
for (i = 0; i < num_file_acls; i++) {
fstring permstring;
unsigned char tagtype = CVAL(retbuf, SMB_POSIX_ACL_HEADER_SIZE+(i*SMB_POSIX_ACL_ENTRY_SIZE));
unsigned char perms = CVAL(retbuf, SMB_POSIX_ACL_HEADER_SIZE+(i*SMB_POSIX_ACL_ENTRY_SIZE)+1);
fstring permstring;
unsigned char tagtype = CVAL(retbuf, SMB_POSIX_ACL_HEADER_SIZE+(i*SMB_POSIX_ACL_ENTRY_SIZE));
unsigned char perms = CVAL(retbuf, SMB_POSIX_ACL_HEADER_SIZE+(i*SMB_POSIX_ACL_ENTRY_SIZE)+1);
}
for (i = 0; i < num_dir_acls; i++) {
}
for (i = 0; i < num_dir_acls; i++) {
fstring permstring;
unsigned char tagtype = CVAL(retbuf, SMB_POSIX_ACL_HEADER_SIZE+((i+num_file_acls)*SMB_POSIX_ACL_ENTRY_SIZE));
unsigned char perms = CVAL(retbuf, SMB_POSIX_ACL_HEADER_SIZE+((i+num_file_acls)*SMB_POSIX_ACL_ENTRY_SIZE)+1);
fstring permstring;
unsigned char tagtype = CVAL(retbuf, SMB_POSIX_ACL_HEADER_SIZE+((i+num_file_acls)*SMB_POSIX_ACL_ENTRY_SIZE));
unsigned char perms = CVAL(retbuf, SMB_POSIX_ACL_HEADER_SIZE+((i+num_file_acls)*SMB_POSIX_ACL_ENTRY_SIZE)+1);
List a share name.
****************************************************************************/
List a share name.
****************************************************************************/
-static void browse_fn(const char *name, uint32 m,
+static void browse_fn(const char *name, uint32_t m,
const char *comment, void *state)
{
const char *typestr = "";
const char *comment, void *state)
{
const char *typestr = "";
List a server name.
****************************************************************************/
List a server name.
****************************************************************************/
-static void server_fn(const char *name, uint32 m,
+static void server_fn(const char *name, uint32_t m,
const char *comment, void *state)
{
const char *comment, void *state)
{
const char *client_get_cur_dir(void);
const char *client_set_cur_dir(const char *newdir);
NTSTATUS do_list(const char *mask,
const char *client_get_cur_dir(void);
const char *client_set_cur_dir(const char *newdir);
NTSTATUS do_list(const char *mask,
NTSTATUS (*fn)(struct cli_state *cli_state, struct file_info *,
const char *dir),
bool rec,
NTSTATUS (*fn)(struct cli_state *cli_state, struct file_info *,
const char *dir),
bool rec,
static int max_token (const char *str);
static NTSTATUS is_subpath(const char *sub, const char *full,
bool *_subpath_match);
static int max_token (const char *str);
static NTSTATUS is_subpath(const char *sub, const char *full,
bool *_subpath_match);
-static int set_remote_attr(const char *filename, uint16 new_attr, int mode);
+static int set_remote_attr(const char *filename, uint16_t new_attr, int mode);
/**
* tar_get_ctx - retrieve global tar context handle
/**
* tar_get_ctx - retrieve global tar context handle
const extern char *cmd_ptr;
char *buf;
char *fname = NULL;
const extern char *cmd_ptr;
char *buf;
char *fname = NULL;
+ uint16_t attr[2] = {0};
int mode = ATTR_SET;
int err = 0;
bool ok;
int mode = ATTR_SET;
int err = 0;
bool ok;
*
* Update the file attributes with the one provided.
*/
*
* Update the file attributes with the one provided.
*/
-static int set_remote_attr(const char *filename, uint16 new_attr, int mode)
+static int set_remote_attr(const char *filename, uint16_t new_attr, int mode)
{
extern struct cli_state *cli;
{
extern struct cli_state *cli;
NTSTATUS status;
status = cli_getatr(cli, filename, &old_attr, NULL, NULL);
NTSTATUS status;
status = cli_getatr(cli, filename, &old_attr, NULL, NULL);
- guint32 type; /* Type of tree item, an SMBC_TYPE */
+ guint32_t type; /* Type of tree item, an SMBC_TYPE */
char name[256]; /* May need to change this later */
};
char name[256]; /* May need to change this later */
};
-struct tree_data *make_tree_data(guint32 type, const char *name)
+struct tree_data *make_tree_data(guint32_t type, const char *name)
{
struct tree_data *p = SMB_MALLOC_P(struct tree_data);
{
struct tree_data *p = SMB_MALLOC_P(struct tree_data);
*/
struct print_job_info {
*/
struct print_job_info {
- uint16 id;
- uint16 priority;
+ uint16_t id;
+ uint16_t priority;
size_t size;
fstring user;
fstring name;
size_t size;
fstring user;
fstring name;
struct file_info {
uint64_t size;
struct file_info {
uint64_t size;
uid_t uid;
gid_t gid;
/* these times are normally kept in GMT */
uid_t uid;
gid_t gid;
/* these times are normally kept in GMT */