static void undo_locks_obtained(struct blocking_lock_record *blr)
{
files_struct *fsp = blr->fsp;
- uint16 num_ulocks = SVAL(blr->req->vwv+6, 0);
+ uint16_t num_ulocks = SVAL(blr->req->vwv+6, 0);
uint64_t count = (uint64_t)0, offset = (uint64_t) 0;
uint64_t smblctx;
unsigned char locktype = CVAL(blr->req->vwv+3, 0);
{
unsigned char locktype = CVAL(blr->req->vwv+3, 0);
files_struct *fsp = blr->fsp;
- uint16 num_ulocks = SVAL(blr->req->vwv+6, 0);
- uint16 num_locks = SVAL(blr->req->vwv+7, 0);
+ uint16_t num_ulocks = SVAL(blr->req->vwv+6, 0);
+ uint16_t num_locks = SVAL(blr->req->vwv+7, 0);
bool large_file_format = (locktype & LOCKING_ANDX_LARGE_FILES);
uint8_t *data;
NTSTATUS status = NT_STATUS_OK;
messaging_send_buf(sconn->msg_ctx, messaging_server_id(sconn->msg_ctx),
MSG_SMB_BLOCKING_LOCK_CANCEL,
- (uint8 *)&msg, sizeof(msg));
+ (uint8_t *)&msg, sizeof(msg));
return blr;
}
struct dptr_struct {
struct dptr_struct *next, *prev;
int dnum;
- uint16 spid;
+ uint16_t spid;
struct connection_struct *conn;
struct smb_Dir *dir_hnd;
bool expect_close;
char *wcard;
- uint32 attr;
+ uint32_t attr;
char *path;
bool has_wild; /* Set to true if the wcard entry has MS wildcard characters in it. */
bool did_stat; /* Optimisation for non-wcard searches. */
static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn,
files_struct *fsp,
const char *mask,
- uint32 attr);
+ uint32_t attr);
static void DirCacheAdd(struct smb_Dir *dirp, const char *name, long offset);
Get the dir attrib for a dir index.
****************************************************************************/
-uint16 dptr_attr(struct smbd_server_connection *sconn, int key)
+uint16_t dptr_attr(struct smbd_server_connection *sconn, int key)
{
struct dptr_struct *dptr = dptr_get(sconn, key, false);
if (dptr)
****************************************************************************/
void dptr_closepath(struct smbd_server_connection *sconn,
- char *path,uint16 spid)
+ char *path,uint16_t spid)
{
struct dptr_struct *dptr, *next;
for(dptr = sconn->searches.dirptrs; dptr; dptr = next) {
NTSTATUS dptr_create(connection_struct *conn,
struct smb_request *req,
files_struct *fsp,
- const char *path, bool old_handle, bool expect_close,uint16 spid,
- const char *wcard, bool wcard_has_wild, uint32 attr, struct dptr_struct **dptr_ret)
+ const char *path, bool old_handle, bool expect_close,uint16_t spid,
+ const char *wcard, bool wcard_has_wild, uint32_t attr, struct dptr_struct **dptr_ret)
{
struct smbd_server_connection *sconn = conn->sconn;
struct dptr_struct *dptr = NULL;
size_t ret_len = 0;
size_t len = (strlen(dname) + 2) * 4; /* Allow enough space. */
uint8_t *tmp = talloc_array(talloc_tos(),
- uint8,
+ uint8_t,
len);
status = srvstr_push(NULL,
struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn,
const char *name,
const char *mask,
- uint32 attr)
+ uint32_t attr)
{
struct smb_Dir *dirp = talloc_zero(mem_ctx, struct smb_Dir);
struct smbd_server_connection *sconn = conn->sconn;
static struct smb_Dir *OpenDir_fsp(TALLOC_CTX *mem_ctx, connection_struct *conn,
files_struct *fsp,
const char *mask,
- uint32 attr)
+ uint32_t attr)
{
struct smb_Dir *dirp = talloc_zero(mem_ctx, struct smb_Dir);
struct smbd_server_connection *sconn = conn->sconn;
#ifndef USE_DMAPI
-uint32 dmapi_file_flags(const char * const path) { return 0; }
+uint32_t dmapi_file_flags(const char * const path) { return 0; }
bool dmapi_have_session(void) { return False; }
const void * dmapi_get_current_session(void) { return NULL; }
is used in vfs_tsmsm.c will work with other DMAPI-based HSM
implementations as well.
*/
-uint32 dmapi_file_flags(const char * const path)
+uint32_t dmapi_file_flags(const char * const path)
{
int err;
dm_eventset_t events = {0};
void *dm_handle = NULL;
size_t dm_handle_len = 0;
- uint32 flags = 0;
+ uint32_t flags = 0;
_dmapi_session_ptr = dmapi_get_current_session();
if (_dmapi_session_ptr == NULL) {
Change a unix mode to a dos mode.
****************************************************************************/
-static uint32 dos_mode_from_sbuf(connection_struct *conn,
+static uint32_t dos_mode_from_sbuf(connection_struct *conn,
const struct smb_filename *smb_fname)
{
int result = 0;
static bool get_ea_dos_attribute(connection_struct *conn,
struct smb_filename *smb_fname,
- uint32 *pattr)
+ uint32_t *pattr)
{
struct xattr_DOSATTRIB dosattrib;
enum ndr_err_code ndr_err;
dosattr |= FILE_ATTRIBUTE_DIRECTORY;
}
/* FILE_ATTRIBUTE_SPARSE is valid on get but not on set. */
- *pattr = (uint32)(dosattr & (SAMBA_ATTRIBUTES_MASK|FILE_ATTRIBUTE_SPARSE));
+ *pattr = (uint32_t)(dosattr & (SAMBA_ATTRIBUTES_MASK|FILE_ATTRIBUTE_SPARSE));
DEBUG(8,("get_ea_dos_attribute returning (0x%x)", dosattr));
static bool set_ea_dos_attribute(connection_struct *conn,
struct smb_filename *smb_fname,
- uint32 dosmode)
+ uint32_t dosmode)
{
struct xattr_DOSATTRIB dosattrib;
enum ndr_err_code ndr_err;
Change a unix mode to a dos mode for an ms dfs link.
****************************************************************************/
-uint32 dos_mode_msdfs(connection_struct *conn,
+uint32_t dos_mode_msdfs(connection_struct *conn,
const struct smb_filename *smb_fname)
{
- uint32 result = 0;
+ uint32_t result = 0;
DEBUG(8,("dos_mode_msdfs: %s\n", smb_fname_str_dbg(smb_fname)));
if "store dos attributes" is true.
****************************************************************************/
-uint32 dos_mode(connection_struct *conn, struct smb_filename *smb_fname)
+uint32_t dos_mode(connection_struct *conn, struct smb_filename *smb_fname)
{
- uint32 result = 0;
+ uint32_t result = 0;
bool offline;
DEBUG(8,("dos_mode: %s\n", smb_fname_str_dbg(smb_fname)));
********************************************************************/
int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
- uint32 dosmode, const char *parent_dir, bool newfile)
+ uint32_t dosmode, const char *parent_dir, bool newfile)
{
int mask=0;
mode_t tmp;
server.
****************************************************************************/
-void error_packet_set(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file)
+void error_packet_set(char *outbuf, uint8_t eclass, uint32_t ecode, NTSTATUS ntstatus, int line, const char *file)
{
bool force_nt_status = False;
bool force_dos_status = False;
- if (eclass == (uint8)-1) {
+ if (eclass == (uint8_t)-1) {
force_nt_status = True;
} else if (NT_STATUS_IS_DOS(ntstatus)) {
force_dos_status = True;
}
}
-int error_packet(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file)
+int error_packet(char *outbuf, uint8_t eclass, uint32_t ecode, NTSTATUS ntstatus, int line, const char *file)
{
int outsize = srv_set_message(outbuf,0,0,True);
error_packet_set(outbuf, eclass, ecode, ntstatus, line, file);
Forces a DOS error on the wire.
****************************************************************************/
-void reply_force_dos_error(struct smb_request *req, uint8 eclass, uint32 ecode,
+void reply_force_dos_error(struct smb_request *req, uint8_t eclass, uint32_t ecode,
int line, const char *file)
{
TALLOC_FREE(req->outbuf);
file);
}
-void reply_both_error(struct smb_request *req, uint8 eclass, uint32 ecode,
+void reply_both_error(struct smb_request *req, uint8_t eclass, uint32_t ecode,
NTSTATUS status, int line, const char *file)
{
TALLOC_FREE(req->outbuf);
Check if setting delete on close is allowed on this fsp.
****************************************************************************/
-NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32 dosmode)
+NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32_t dosmode)
{
/*
* Only allow delete on close for writable files.
Close all open files for a pid and a vuid.
****************************************************************************/
-void file_close_pid(struct smbd_server_connection *sconn, uint16 smbpid,
+void file_close_pid(struct smbd_server_connection *sconn, uint16_t smbpid,
uint64_t vuid)
{
files_struct *fsp, *next;
Get an fsp from a packet given a 16 bit fnum.
****************************************************************************/
-files_struct *file_fsp(struct smb_request *req, uint16 fid)
+files_struct *file_fsp(struct smb_request *req, uint16_t fid)
{
struct smbXsrv_open *op;
NTSTATUS status;
****************************************************************************/
NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *from,
- uint32 access_mask, uint32 share_access,
- uint32 create_options, files_struct *to)
+ uint32_t access_mask, uint32_t share_access,
+ uint32_t create_options, files_struct *to)
{
/* this can never happen for print files */
SMB_ASSERT(from->print_file == NULL);
NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
connection_struct *conn,
struct dptr_struct *dirptr,
- uint16 flags2,
+ uint16_t flags2,
const char *path_mask,
- uint32 dirtype,
+ uint32_t dirtype,
int info_level,
int requires_resume_key,
bool dont_descend,
static void api_fd_reply(connection_struct *conn, uint64_t vuid,
struct smb_request *req,
- uint16 *setup, uint8_t *data, char *params,
+ uint16_t *setup, uint8_t *data, char *params,
int suwcnt, int tdscnt, int tpscnt,
int mdrcnt, int mprcnt)
{
static void named_pipe(connection_struct *conn, uint64_t vuid,
struct smb_request *req,
- const char *name, uint16 *setup,
+ const char *name, uint16_t *setup,
char *data, char *params,
int suwcnt, int tdscnt,int tpscnt,
int msrcnt, int mdrcnt, int mprcnt)
}
if((state->setup = talloc_array(
- state, uint16, state->setup_count)) == NULL) {
+ state, uint16_t, state->setup_count)) == NULL) {
DEBUG(0,("reply_trans: setup malloc fail for %u "
"bytes !\n", (unsigned int)
- (state->setup_count * sizeof(uint16))));
+ (state->setup_count * sizeof(uint16_t))));
SAFE_FREE(state->data);
SAFE_FREE(state->param);
TALLOC_FREE(state);
extern fstring remote_proto;
-static void get_challenge(struct smbXsrv_connection *xconn, uint8 buff[8])
+static void get_challenge(struct smbXsrv_connection *xconn, uint8_t buff[8])
{
NTSTATUS nt_status;
Reply for the lanman 1.0 protocol.
****************************************************************************/
-static void reply_lanman1(struct smb_request *req, uint16 choice)
+static void reply_lanman1(struct smb_request *req, uint16_t choice)
{
int secword=0;
time_t t = time(NULL);
SSVAL(req->outbuf,smb_vwv1,secword);
/* Create a token value and add it to the outgoing packet. */
if (xconn->smb1.negprot.encrypted_passwords) {
- get_challenge(xconn, (uint8 *)smb_buf(req->outbuf));
+ get_challenge(xconn, (uint8_t *)smb_buf(req->outbuf));
SSVAL(req->outbuf,smb_vwv11, 8);
}
Reply for the lanman 2.0 protocol.
****************************************************************************/
-static void reply_lanman2(struct smb_request *req, uint16 choice)
+static void reply_lanman2(struct smb_request *req, uint16_t choice)
{
int secword=0;
time_t t = time(NULL);
/* Create a token value and add it to the outgoing packet. */
if (xconn->smb1.negprot.encrypted_passwords) {
- get_challenge(xconn, (uint8 *)smb_buf(req->outbuf));
+ get_challenge(xconn, (uint8_t *)smb_buf(req->outbuf));
SSVAL(req->outbuf,smb_vwv11, 8);
}
Reply for the nt protocol.
****************************************************************************/
-static void reply_nt1(struct smb_request *req, uint16 choice)
+static void reply_nt1(struct smb_request *req, uint16_t choice)
{
/* dual names + lock_and_read + nt SMBs + remote API calls */
int capabilities = CAP_NT_FIND|CAP_LOCK_AND_READ|
if (!negotiate_spnego) {
/* Create a token value and add it to the outgoing packet. */
if (xconn->smb1.negprot.encrypted_passwords) {
- uint8 chal[8];
+ uint8_t chal[8];
/* note that we do not send a challenge at all if
we are using plaintext */
get_challenge(xconn, chal);
static const struct {
const char *proto_name;
const char *short_name;
- void (*proto_reply_fn)(struct smb_request *req, uint16 choice);
+ void (*proto_reply_fn)(struct smb_request *req, uint16_t choice);
int protocol_level;
} supported_protocols[] = {
{"SMB 2.???", "SMB2_FF", reply_smb20ff, PROTOCOL_SMB2_10},
struct notify_change_request *prev, *next;
struct files_struct *fsp; /* backpointer for cancel by mid */
struct smb_request *req;
- uint32 filter;
- uint32 max_param;
+ uint32_t filter;
+ uint32_t max_param;
void (*reply_fn)(struct smb_request *req,
NTSTATUS error_code,
uint8_t *buf, size_t len);
};
static void notify_fsp(files_struct *fsp, struct timespec when,
- uint32 action, const char *name);
+ uint32_t action, const char *name);
bool change_notify_fsp_has_changes(struct files_struct *fsp)
{
}
static bool notify_marshall_changes(int num_changes,
- uint32 max_offset,
+ uint32_t max_offset,
struct notify_change_event *changes,
DATA_BLOB *final_blob)
{
notify_fsp(fsp, timespec_current(), e->action, e->path);
}
-NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
+NTSTATUS change_notify_create(struct files_struct *fsp, uint32_t filter,
bool recursive)
{
char *fullpath;
}
NTSTATUS change_notify_add_request(struct smb_request *req,
- uint32 max_param,
- uint32 filter, bool recursive,
+ uint32_t max_param,
+ uint32_t filter, bool recursive,
struct files_struct *fsp,
void (*reply_fn)(struct smb_request *req,
NTSTATUS error_code,
}
}
-void notify_fname(connection_struct *conn, uint32 action, uint32 filter,
+void notify_fname(connection_struct *conn, uint32_t action, uint32_t filter,
const char *path)
{
struct notify_context *notify_ctx = conn->sconn->notify_ctx;
}
static void notify_fsp(files_struct *fsp, struct timespec when,
- uint32 action, const char *name)
+ uint32_t action, const char *name)
{
struct notify_change_event *change, *changes;
char *tmp;
change_notify_remove_request(fsp->conn->sconn, fsp->notify->requests);
}
-char *notify_filter_string(TALLOC_CTX *mem_ctx, uint32 filter)
+char *notify_filter_string(TALLOC_CTX *mem_ctx, uint32_t filter)
{
char *result = NULL;
"share entry with an open file\n");
}
- if (((uint16)fsp->oplock_type) != share_entry->op_type) {
+ if (((uint16_t)fsp->oplock_type) != share_entry->op_type) {
goto panic;
}
/* Overload entry->op_type */
/*
- * This is a cut from uint32_t to uint16, but so far only the lower 3
+ * This is a cut from uint32_t to uint16_t, but so far only the lower 3
* bits (LEASE_WRITE/HANDLE/READ are used anyway.
*/
SSVAL(msg,OP_BREAK_MSG_OP_TYPE_OFFSET, break_to);
SSVAL(msg, OP_BREAK_MSG_OP_TYPE_OFFSET, NO_OPLOCK);
messaging_send_buf(msg_ctx, e->pid, MSG_SMB_BREAK_REQUEST,
- (uint8 *)msg, sizeof(msg));
+ (uint8_t *)msg, sizeof(msg));
}
static void do_break_to_none(struct tevent_context *ctx,
void share_mode_entry_to_message(char *msg, const struct share_mode_entry *e)
{
- SIVAL(msg,OP_BREAK_MSG_PID_OFFSET,(uint32)e->pid.pid);
+ SIVAL(msg,OP_BREAK_MSG_PID_OFFSET,(uint32_t)e->pid.pid);
SBVAL(msg,OP_BREAK_MSG_MID_OFFSET,e->op_mid);
SSVAL(msg,OP_BREAK_MSG_OP_TYPE_OFFSET,e->op_type);
SIVAL(msg,OP_BREAK_MSG_ACCESS_MASK_OFFSET,e->access_mask);
e->time.tv_usec = (int)IVAL(msg,OP_BREAK_MSG_TIME_USEC_OFFSET);
pull_file_id_24(msg+OP_BREAK_MSG_DEV_OFFSET, &e->id);
e->share_file_id = (unsigned long)IVAL(msg,OP_BREAK_MSG_FILE_ID_OFFSET);
- e->uid = (uint32)IVAL(msg,OP_BREAK_MSG_UID_OFFSET);
- e->flags = (uint16)SVAL(msg,OP_BREAK_MSG_FLAGS_OFFSET);
+ e->uid = (uint32_t)IVAL(msg,OP_BREAK_MSG_UID_OFFSET);
+ e->flags = (uint16_t)SVAL(msg,OP_BREAK_MSG_FLAGS_OFFSET);
e->name_hash = IVAL(msg,OP_BREAK_MSG_NAME_HASH_OFFSET);
e->pid.vnn = IVAL(msg,OP_BREAK_MSG_VNN_OFFSET);
}
is deliberate, instead we always return the next lump of
data on the pipe */
#if 0
- uint32 smb_offs = IVAL(req->vwv+3, 0);
+ uint32_t smb_offs = IVAL(req->vwv+3, 0);
#endif
if (!fsp_is_np(fsp)) {
};
/************************************************************************
- Return a uint32 of the pai_entry principal.
+ Return a uint32_t of the pai_entry principal.
************************************************************************/
static uint32_t get_pai_entry_val(struct pai_entry *paie)
}
/************************************************************************
- Return a uint32 of the entry principal.
+ Return a uint32_t of the entry principal.
************************************************************************/
static uint32_t get_entry_val(canon_ace *ace_entry)
static bool check_pai_ok_v1(const char *pai_buf, size_t pai_buf_data_size)
{
- uint16 num_entries;
- uint16 num_def_entries;
+ uint16_t num_entries;
+ uint16_t num_def_entries;
if (pai_buf_data_size < PAI_V1_ENTRIES_BASE) {
/* Corrupted - too small. */
static bool check_pai_ok_v2(const char *pai_buf, size_t pai_buf_data_size)
{
- uint16 num_entries;
- uint16 num_def_entries;
+ uint16_t num_entries;
+ uint16_t num_def_entries;
if (pai_buf_data_size < PAI_V2_ENTRIES_BASE) {
/* Corrupted - too small. */
#define FILE_SPECIFIC_WRITE_BITS (FILE_WRITE_DATA|FILE_APPEND_DATA|FILE_WRITE_EA)
#define FILE_SPECIFIC_EXECUTE_BITS (FILE_EXECUTE)
-static mode_t map_nt_perms( uint32 *mask, int type)
+static mode_t map_nt_perms( uint32_t *mask, int type)
{
mode_t mode = 0;
NTSTATUS unpack_nt_owners(struct connection_struct *conn,
uid_t *puser, gid_t *pgrp,
- uint32 security_info_sent, const struct
+ uint32_t security_info_sent, const struct
security_descriptor *psd)
{
*puser = (uid_t)-1;
struct dom_sid *pfile_grp_sid,
canon_ace **ppfile_ace,
canon_ace **ppdir_ace,
- uint32 security_info_sent,
+ uint32_t security_info_sent,
const struct security_descriptor *psd)
{
canon_ace *file_ace = NULL;
for (i = 0; i < num_aces; i++) {
for (j = i+1; j < num_aces; j++) {
- uint32 i_flags_ni = (nt_ace_list[i].flags & ~SEC_ACE_FLAG_INHERITED_ACE);
- uint32 j_flags_ni = (nt_ace_list[j].flags & ~SEC_ACE_FLAG_INHERITED_ACE);
+ uint32_t i_flags_ni = (nt_ace_list[i].flags & ~SEC_ACE_FLAG_INHERITED_ACE);
+ uint32_t j_flags_ni = (nt_ace_list[j].flags & ~SEC_ACE_FLAG_INHERITED_ACE);
bool i_inh = (nt_ace_list[i].flags & SEC_ACE_FLAG_INHERITED_ACE) ? True : False;
bool j_inh = (nt_ace_list[j].flags & SEC_ACE_FLAG_INHERITED_ACE) ? True : False;
it, even though it's a const pointer.
****************************************************************************/
-NTSTATUS set_nt_acl(files_struct *fsp, uint32 security_info_sent, const struct security_descriptor *psd_orig)
+NTSTATUS set_nt_acl(files_struct *fsp, uint32_t security_info_sent, const struct security_descriptor *psd_orig)
{
connection_struct *conn = fsp->conn;
uid_t user = (uid_t)-1;
****************************************************************************/
static SMB_ACL_T create_posix_acl_from_wire(connection_struct *conn,
- uint16 num_acls,
+ uint16_t num_acls,
const char *pdata,
TALLOC_CTX *mem_ctx)
{
}
if (tag_type == SMB_ACL_USER) {
- uint32 uidval = IVAL(pdata,(i*SMB_POSIX_ACL_ENTRY_SIZE)+2);
+ uint32_t uidval = IVAL(pdata,(i*SMB_POSIX_ACL_ENTRY_SIZE)+2);
uid_t uid = (uid_t)uidval;
if (sys_acl_set_qualifier(the_entry,(void *)&uid) == -1) {
DEBUG(0,("create_posix_acl_from_wire: Failed to set uid %u on entry %u. (%s)\n",
}
if (tag_type == SMB_ACL_GROUP) {
- uint32 gidval = IVAL(pdata,(i*SMB_POSIX_ACL_ENTRY_SIZE)+2);
+ uint32_t gidval = IVAL(pdata,(i*SMB_POSIX_ACL_ENTRY_SIZE)+2);
gid_t gid = (uid_t)gidval;
if (sys_acl_set_qualifier(the_entry,(void *)&gid) == -1) {
DEBUG(0,("create_posix_acl_from_wire: Failed to set gid %u on entry %u. (%s)\n",
****************************************************************************/
bool set_unix_posix_default_acl(connection_struct *conn, const char *fname, const SMB_STRUCT_STAT *psbuf,
- uint16 num_def_acls, const char *pdata)
+ uint16_t num_def_acls, const char *pdata)
{
SMB_ACL_T def_acl = NULL;
except SMB_ACL_USER_OBJ, SMB_ACL_GROUP_OBJ, SMB_ACL_OTHER.
****************************************************************************/
-bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname, uint16 num_acls, const char *pdata)
+bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname, uint16_t num_acls, const char *pdata)
{
SMB_ACL_T file_acl = NULL;
********************************************************************/
NTSTATUS get_nt_acl_no_snum(TALLOC_CTX *ctx, const char *fname,
- uint32 security_info_wanted,
+ uint32_t security_info_wanted,
struct security_descriptor **sd)
{
TALLOC_CTX *frame = talloc_stackframe();
static bool init_smb_request(struct smb_request *req,
struct smbd_server_connection *sconn,
struct smbXsrv_connection *xconn,
- const uint8 *inbuf,
+ const uint8_t *inbuf,
size_t unread_bytes, bool encrypted,
uint32_t seqnum)
{
return true;
}
-void reply_outbuf(struct smb_request *req, uint8 num_words, uint32 num_bytes)
+void reply_outbuf(struct smb_request *req, uint8_t num_words, uint32_t num_bytes)
{
char *outbuf;
if (!create_outbuf(req, req, req->inbuf, &outbuf, num_words,
find.
****************************************************************************/
-static connection_struct *switch_message(uint8 type, struct smb_request *req)
+static connection_struct *switch_message(uint8_t type, struct smb_request *req)
{
int flags;
uint64_t session_tag;
smb_panic("could not allocate smb_request");
}
- if (!init_smb_request(req, sconn, xconn, (uint8 *)inbuf, unread_bytes,
+ if (!init_smb_request(req, sconn, xconn, (uint8_t *)inbuf, unread_bytes,
encrypted, seqnum)) {
exit_server_cleanly("Invalid SMB request");
}
Helper functions for contruct_reply.
****************************************************************************/
-void add_to_common_flags2(uint32 v)
+void add_to_common_flags2(uint32_t v)
{
common_flags2 |= v;
}
-void remove_from_common_flags2(uint32 v)
+void remove_from_common_flags2(uint32_t v)
{
common_flags2 &= ~v;
}
bool init_dptrs(struct smbd_server_connection *sconn);
const char *dptr_path(struct smbd_server_connection *sconn, int key);
const char *dptr_wcard(struct smbd_server_connection *sconn, int key);
-uint16 dptr_attr(struct smbd_server_connection *sconn, int key);
+uint16_t dptr_attr(struct smbd_server_connection *sconn, int key);
void dptr_close(struct smbd_server_connection *sconn, int *key);
void dptr_closecnum(connection_struct *conn);
void dptr_idlecnum(connection_struct *conn);
void dptr_closepath(struct smbd_server_connection *sconn,
- char *path,uint16 spid);
+ char *path,uint16_t spid);
NTSTATUS dptr_create(connection_struct *conn,
struct smb_request *req,
files_struct *fsp,
- const char *path, bool old_handle, bool expect_close,uint16 spid,
- const char *wcard, bool wcard_has_wild, uint32 attr, struct dptr_struct **dptr_ret);
+ const char *path, bool old_handle, bool expect_close,uint16_t spid,
+ const char *wcard, bool wcard_has_wild, uint32_t attr, struct dptr_struct **dptr_ret);
void dptr_CloseDir(files_struct *fsp);
void dptr_SeekDir(struct dptr_struct *dptr, long offset);
long dptr_TellDir(struct dptr_struct *dptr);
bool get_dir_entry(TALLOC_CTX *ctx,
struct dptr_struct *dirptr,
const char *mask,
- uint32 dirtype,
+ uint32_t dirtype,
char **pp_fname_out,
off_t *size,
- uint32 *mode,
+ uint32_t *mode,
struct timespec *date,
bool check_descend,
bool ask_sharemode);
bool is_visible_file(connection_struct *conn, const char *dir_path, const char *name, SMB_STRUCT_STAT *pst, bool use_veto);
struct smb_Dir *OpenDir(TALLOC_CTX *mem_ctx, connection_struct *conn,
- const char *name, const char *mask, uint32 attr);
+ const char *name, const char *mask, uint32_t attr);
const char *ReadDirName(struct smb_Dir *dirp, long *poffset,
SMB_STRUCT_STAT *sbuf, char **talloced);
void RewindDir(struct smb_Dir *dirp, long *poffset);
bool dmapi_have_session(void);
bool dmapi_new_session(void);
bool dmapi_destroy_session(void);
-uint32 dmapi_file_flags(const char * const path);
+uint32_t dmapi_file_flags(const char * const path);
/* The following definitions come from smbd/dnsregister.c */
mode_t unix_mode(connection_struct *conn, int dosmode,
const struct smb_filename *smb_fname,
const char *inherit_from_dir);
-uint32 dos_mode_msdfs(connection_struct *conn,
+uint32_t dos_mode_msdfs(connection_struct *conn,
const struct smb_filename *smb_fname);
int dos_attributes_to_stat_dos_flags(uint32_t dosmode);
-uint32 dos_mode(connection_struct *conn, struct smb_filename *smb_fname);
+uint32_t dos_mode(connection_struct *conn, struct smb_filename *smb_fname);
int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
- uint32 dosmode, const char *parent_dir, bool newfile);
+ uint32_t dosmode, const char *parent_dir, bool newfile);
NTSTATUS file_set_sparse(connection_struct *conn,
struct files_struct *fsp,
bool sparse);
/* The following definitions come from smbd/error.c */
bool use_nt_status(void);
-void error_packet_set(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file);
-int error_packet(char *outbuf, uint8 eclass, uint32 ecode, NTSTATUS ntstatus, int line, const char *file);
+void error_packet_set(char *outbuf, uint8_t eclass, uint32_t ecode, NTSTATUS ntstatus, int line, const char *file);
+int error_packet(char *outbuf, uint8_t eclass, uint32_t ecode, NTSTATUS ntstatus, int line, const char *file);
void reply_nt_error(struct smb_request *req, NTSTATUS ntstatus,
int line, const char *file);
-void reply_force_dos_error(struct smb_request *req, uint8 eclass, uint32 ecode,
+void reply_force_dos_error(struct smb_request *req, uint8_t eclass, uint32_t ecode,
int line, const char *file);
-void reply_both_error(struct smb_request *req, uint8 eclass, uint32 ecode,
+void reply_both_error(struct smb_request *req, uint8_t eclass, uint32_t ecode,
NTSTATUS status, int line, const char *file);
void reply_openerror(struct smb_request *req, NTSTATUS status);
bool can_write_to_file(connection_struct *conn,
const struct smb_filename *smb_fname);
bool directory_has_default_acl(connection_struct *conn, const char *fname);
-NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32 dosmode);
+NTSTATUS can_set_delete_on_close(files_struct *fsp, uint32_t dosmode);
/* The following definitions come from smbd/fileio.c */
NTSTATUS file_new(struct smb_request *req, connection_struct *conn,
files_struct **result);
void file_close_conn(connection_struct *conn);
-void file_close_pid(struct smbd_server_connection *sconn, uint16 smbpid,
+void file_close_pid(struct smbd_server_connection *sconn, uint16_t smbpid,
uint64_t vuid);
bool file_init_global(void);
bool file_init(struct smbd_server_connection *sconn);
void file_sync_all(connection_struct *conn);
void fsp_free(files_struct *fsp);
void file_free(struct smb_request *req, files_struct *fsp);
-files_struct *file_fsp(struct smb_request *req, uint16 fid);
+files_struct *file_fsp(struct smb_request *req, uint16_t fid);
struct files_struct *file_fsp_get(struct smbd_smb2_request *smb2req,
uint64_t persistent_id,
uint64_t volatile_id);
uint64_t persistent_id,
uint64_t volatile_id);
NTSTATUS dup_file_fsp(struct smb_request *req, files_struct *from,
- uint32 access_mask, uint32 share_access,
- uint32 create_options, files_struct *to);
+ uint32_t access_mask, uint32_t share_access,
+ uint32_t create_options, files_struct *to);
NTSTATUS file_name_hash(connection_struct *conn,
const char *name, uint32_t *p_name_hash);
NTSTATUS fsp_set_smb_fname(struct files_struct *fsp,
void (*reply_fn)(struct smb_request *req,
NTSTATUS error_code,
uint8_t *buf, size_t len));
-NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
+NTSTATUS change_notify_create(struct files_struct *fsp, uint32_t filter,
bool recursive);
NTSTATUS change_notify_add_request(struct smb_request *req,
- uint32 max_param,
- uint32 filter, bool recursive,
+ uint32_t max_param,
+ uint32_t filter, bool recursive,
struct files_struct *fsp,
void (*reply_fn)(struct smb_request *req,
NTSTATUS error_code,
struct smbd_server_connection *sconn, uint64_t mid);
void remove_pending_change_notify_requests_by_fid(files_struct *fsp,
NTSTATUS status);
-void notify_fname(connection_struct *conn, uint32 action, uint32 filter,
+void notify_fname(connection_struct *conn, uint32_t action, uint32_t filter,
const char *path);
-char *notify_filter_string(TALLOC_CTX *mem_ctx, uint32 filter);
+char *notify_filter_string(TALLOC_CTX *mem_ctx, uint32_t filter);
struct sys_notify_context *sys_notify_context_create(TALLOC_CTX *mem_ctx,
struct tevent_context *ev);
const char *inherit_from_dir,
const char *fname,
SMB_STRUCT_STAT *psbuf);
-bool is_stat_open(uint32 access_mask);
+bool is_stat_open(uint32_t access_mask);
NTSTATUS send_break_message(struct messaging_context *msg_ctx,
const struct share_mode_entry *exclusive,
uint16_t break_to);
enum security_ace_type *pacl_type,
mode_t perms,
bool directory_ace);
-NTSTATUS unpack_nt_owners(connection_struct *conn, uid_t *puser, gid_t *pgrp, uint32 security_info_sent, const struct security_descriptor *psd);
+NTSTATUS unpack_nt_owners(connection_struct *conn, uid_t *puser, gid_t *pgrp, uint32_t security_info_sent, const struct security_descriptor *psd);
bool current_user_in_group(connection_struct *conn, gid_t gid);
SMB_ACL_T free_empty_sys_acl(connection_struct *conn, SMB_ACL_T the_acl);
NTSTATUS posix_fget_nt_acl(struct files_struct *fsp, uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc);
NTSTATUS try_chown(files_struct *fsp, uid_t uid, gid_t gid);
-NTSTATUS set_nt_acl(files_struct *fsp, uint32 security_info_sent, const struct security_descriptor *psd);
+NTSTATUS set_nt_acl(files_struct *fsp, uint32_t security_info_sent, const struct security_descriptor *psd);
int get_acl_group_bits( connection_struct *conn, const char *fname, mode_t *mode );
int chmod_acl(connection_struct *conn, const char *name, mode_t mode);
int inherit_access_posix_acl(connection_struct *conn, const char *inherit_from_dir,
int fchmod_acl(files_struct *fsp, mode_t mode);
bool set_unix_posix_default_acl(connection_struct *conn, const char *fname,
const SMB_STRUCT_STAT *psbuf,
- uint16 num_def_acls, const char *pdata);
-bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname, uint16 num_acls, const char *pdata);
+ uint16_t num_def_acls, const char *pdata);
+bool set_unix_posix_acl(connection_struct *conn, files_struct *fsp, const char *fname, uint16_t num_acls, const char *pdata);
NTSTATUS get_nt_acl_no_snum( TALLOC_CTX *ctx, const char *fname,
- uint32 security_info_wanted,
+ uint32_t security_info_wanted,
struct security_descriptor **sd);
NTSTATUS make_default_filesystem_acl(TALLOC_CTX *ctx,
const char *name,
struct file_id id,
struct deferred_open_record *open_rec);
NTSTATUS allow_new_trans(struct trans_state *list, uint64_t mid);
-void reply_outbuf(struct smb_request *req, uint8 num_words, uint32 num_bytes);
+void reply_outbuf(struct smb_request *req, uint8_t num_words, uint32_t num_bytes);
void smb_request_done(struct smb_request *req);
const char *smb_fn_name(int type);
-void add_to_common_flags2(uint32 v);
-void remove_from_common_flags2(uint32 v);
+void add_to_common_flags2(uint32_t v);
+void remove_from_common_flags2(uint32_t v);
void construct_reply_common_req(struct smb_request *req, char *outbuf);
bool smb1_is_chain(const uint8_t *buf);
bool smb1_walk_chain(const uint8_t *buf,
NTSTATUS check_path_syntax_posix(char *path);
size_t srvstr_get_path_wcard(TALLOC_CTX *ctx,
const char *inbuf,
- uint16 smb_flags2,
+ uint16_t smb_flags2,
char **pp_dest,
const char *src,
size_t src_len,
bool *contains_wcard);
size_t srvstr_get_path(TALLOC_CTX *ctx,
const char *inbuf,
- uint16 smb_flags2,
+ uint16_t smb_flags2,
char **pp_dest,
const char *src,
size_t src_len,
void reply_special(struct smbXsrv_connection *xconn, char *inbuf, size_t inbuf_size);
void reply_tcon(struct smb_request *req);
void reply_tcon_and_X(struct smb_request *req);
-void reply_unknown_new(struct smb_request *req, uint8 type);
+void reply_unknown_new(struct smb_request *req, uint8_t type);
void reply_ioctl(struct smb_request *req);
void reply_checkpath(struct smb_request *req);
void reply_getatr(struct smb_request *req);
void reply_mknew(struct smb_request *req);
void reply_ctemp(struct smb_request *req);
NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
- uint32 dirtype, struct smb_filename *smb_fname,
+ uint32_t dirtype, struct smb_filename *smb_fname,
bool has_wild);
void reply_unlink(struct smb_request *req);
ssize_t fake_sendfile(struct smbXsrv_connection *xconn, files_struct *fsp,
NTSTATUS rename_internals_fsp(connection_struct *conn,
files_struct *fsp,
const struct smb_filename *smb_fname_dst_in,
- uint32 attrs,
+ uint32_t attrs,
bool replace_if_exists);
NTSTATUS rename_internals(TALLOC_CTX *ctx,
connection_struct *conn,
struct smb_request *req,
struct smb_filename *smb_fname_src,
struct smb_filename *smb_fname_dst,
- uint32 attrs,
+ uint32_t attrs,
bool replace_if_exists,
bool src_has_wild,
bool dest_has_wild,
bool set_conn_connectpath(connection_struct *conn, const char *connectpath);
NTSTATUS set_conn_force_user_group(connection_struct *conn, int snum);
-bool set_current_service(connection_struct *conn, uint16 flags, bool do_chdir);
+bool set_current_service(connection_struct *conn, uint16_t flags, bool do_chdir);
void load_registry_shares(void);
int add_home_service(const char *service, const char *username, const char *homedir);
int find_service(TALLOC_CTX *ctx, const char *service, char **p_service_out);
/* The following definitions come from smbd/srvstr.c */
-NTSTATUS srvstr_push_fn(const char *base_ptr, uint16 smb_flags2, void *dest,
+NTSTATUS srvstr_push_fn(const char *base_ptr, uint16_t smb_flags2, void *dest,
const char *src, int dest_len, int flags, size_t *ret_len);
-ssize_t message_push_string(uint8 **outbuf, const char *str, int flags);
+ssize_t message_push_string(uint8_t **outbuf, const char *str, int flags);
/* The following definitions come from smbd/statcache.c */
}
static NTSTATUS set_nt_acl_conn(const char *fname,
- uint32 security_info_sent, const struct security_descriptor *sd,
+ uint32_t security_info_sent, const struct security_descriptor *sd,
connection_struct *conn)
{
TALLOC_CTX *frame = talloc_stackframe();
static NTSTATUS get_nt_acl_conn(TALLOC_CTX *mem_ctx,
const char *fname,
connection_struct *conn,
- uint32 security_info_wanted,
+ uint32_t security_info_wanted,
struct security_descriptor **sd)
{
TALLOC_CTX *frame = talloc_stackframe();
} else {
srv_put_dos_date3((char *)req->outbuf,smb_vwv1,mtime);
}
- SIVAL(req->outbuf,smb_vwv3,(uint32)size);
+ SIVAL(req->outbuf,smb_vwv3,(uint32_t)size);
if (get_Protocol() >= PROTOCOL_NT1) {
SSVAL(req->outbuf, smb_flg2,
} else {
srv_put_dos_date3((char *)req->outbuf,smb_vwv2,mtime);
}
- SIVAL(req->outbuf,smb_vwv4,(uint32)size);
+ SIVAL(req->outbuf,smb_vwv4,(uint32_t)size);
SSVAL(req->outbuf,smb_vwv6,deny_mode);
if (oplock_request && lp_fake_oplocks(SNUM(conn))) {
} else {
srv_put_dos_date3((char *)req->outbuf,smb_vwv4,mtime);
}
- SIVAL(req->outbuf,smb_vwv6,(uint32)fsp->fsp_name->st.st_ex_size);
+ SIVAL(req->outbuf,smb_vwv6,(uint32_t)fsp->fsp_name->st.st_ex_size);
SSVAL(req->outbuf,smb_vwv8,GET_OPENX_MODE(deny_mode));
SSVAL(req->outbuf,smb_vwv11,smb_action);
SIVAL(req->outbuf, smb_vwv8, 0);
} else {
uint32_t allocation_size = SMB_VFS_GET_ALLOC_SIZE(conn,fsp, &fsp->fsp_name->st);
- SIVAL(req->outbuf, smb_vwv6, (uint32)fsp->fsp_name->st.st_ex_size);
+ SIVAL(req->outbuf, smb_vwv6, (uint32_t)fsp->fsp_name->st.st_ex_size);
SIVAL(req->outbuf, smb_vwv8, allocation_size);
}
SSVAL(req->outbuf,smb_vwv10, mode);
/* Output the build options to the debug log */
build_options(False);
- if (sizeof(uint16) < 2 || sizeof(uint32) < 4) {
+ if (sizeof(uint16_t) < 2 || sizeof(uint32_t) < 4) {
DEBUG(0,("ERROR: Samba is not configured correctly for the word size on your machine\n"));
exit(1);
}
Load parameters specific to a connection/service.
****************************************************************************/
-bool set_current_service(connection_struct *conn, uint16 flags, bool do_chdir)
+bool set_current_service(connection_struct *conn, uint16_t flags, bool do_chdir)
{
int snum;
Add the standard 'Samba' signature to the end of the session setup.
****************************************************************************/
-static int push_signature(uint8 **outbuf)
+static int push_signature(uint8_t **outbuf)
{
char *lanman;
int result, tmp;
static void reply_sesssetup_and_X_spnego(struct smb_request *req)
{
- const uint8 *p;
+ const uint8_t *p;
DATA_BLOB in_blob;
DATA_BLOB out_blob = data_blob_null;
size_t bufrem;
const char *native_os;
const char *native_lanman;
const char *primary_domain;
- uint16 data_blob_len = SVAL(req->vwv+7, 0);
+ uint16_t data_blob_len = SVAL(req->vwv+7, 0);
enum remote_arch_types ra_type = get_remote_arch();
uint64_t vuid = req->vuid;
NTSTATUS status = NT_STATUS_OK;
const char *primary_domain;
struct auth_usersupplied_info *user_info = NULL;
struct auth_session_info *session_info = NULL;
- uint16 smb_flag2 = req->flags2;
+ uint16_t smb_flag2 = req->flags2;
uint16_t action = 0;
NTTIME now = timeval_to_nttime(&req->request_time);
struct smbXsrv_session *session = NULL;
smb_bufsize = SVAL(req->vwv+2, 0);
if (get_Protocol() < PROTOCOL_NT1) {
- uint16 passlen1 = SVAL(req->vwv+7, 0);
+ uint16_t passlen1 = SVAL(req->vwv+7, 0);
/* Never do NT status codes with protocols before NT1 as we
* don't get client caps. */
domain = "";
} else {
- uint16 passlen1 = SVAL(req->vwv+7, 0);
- uint16 passlen2 = SVAL(req->vwv+8, 0);
+ uint16_t passlen1 = SVAL(req->vwv+7, 0);
+ uint16_t passlen2 = SVAL(req->vwv+8, 0);
enum remote_arch_types ra_type = get_remote_arch();
const uint8_t *p = req->buf;
const uint8_t *save_p = req->buf;
- uint16 byte_count;
+ uint16_t byte_count;
if (!xconn->smb1.sessions.done_sesssetup) {
global_client_caps = IVAL(req->vwv+11, 0);
uint64_t vuid; /* SMB2 compat */
uint64_t mid;
- uint32 max_param_return;
- uint32 max_data_return;
- uint32 max_setup_return;
+ uint32_t max_param_return;
+ uint32_t max_data_return;
+ uint32_t max_setup_return;
- uint8 cmd; /* SMBtrans or SMBtrans2 */
+ uint8_t cmd; /* SMBtrans or SMBtrans2 */
char *name; /* for trans requests */
- uint16 call; /* for trans2 and nttrans requests */
+ uint16_t call; /* for trans2 and nttrans requests */
bool close_on_completion;
bool one_way;
unsigned int setup_count;
- uint16 *setup;
+ uint16_t *setup;
size_t received_data;
size_t received_param;
/* Make sure we can't write a string past the end of the buffer */
-NTSTATUS srvstr_push_fn(const char *base_ptr, uint16 smb_flags2, void *dest,
+NTSTATUS srvstr_push_fn(const char *base_ptr, uint16_t smb_flags2, void *dest,
const char *src, int dest_len, int flags, size_t *ret_len)
{
size_t len;
Return the bytes added
********************************************************************/
-ssize_t message_push_string(uint8 **outbuf, const char *str, int flags)
+ssize_t message_push_string(uint8_t **outbuf, const char *str, int flags)
{
size_t buf_size = smb_len(*outbuf) + 4;
size_t grow_size;
size_t result = 0;
- uint8 *tmp;
+ uint8_t *tmp;
NTSTATUS status;
/*
*/
grow_size = (strlen(str) + 2) * 4;
- if (!(tmp = talloc_realloc(NULL, *outbuf, uint8,
+ if (!(tmp = talloc_realloc(NULL, *outbuf, uint8_t,
buf_size + grow_size))) {
DEBUG(0, ("talloc failed\n"));
return -1;
SSVAL(params,0,fsp->fnum);
SSVAL(params,2,fattr);
srv_put_dos_date2(params,4, mtime);
- SIVAL(params,8, (uint32)size);
+ SIVAL(params,8, (uint32_t)size);
SSVAL(params,12,deny_mode);
SSVAL(params,14,0); /* open_type - file or directory. */
SSVAL(params,16,0); /* open_state - only valid for IPC device. */
size_t ret_len = 0;
size_t len = (strlen(dname) + 2) * 4; /* Allow enough space. */
uint8_t *tmp = talloc_array(talloc_tos(),
- uint8,
+ uint8_t,
len);
status = srvstr_push(NULL,
srv_put_dos_date2(p,0,create_date);
srv_put_dos_date2(p,4,adate);
srv_put_dos_date2(p,8,mdate);
- SIVAL(p,12,(uint32)file_size);
- SIVAL(p,16,(uint32)allocation_size);
+ SIVAL(p,12,(uint32_t)file_size);
+ SIVAL(p,16,(uint32_t)allocation_size);
SSVAL(p,20,mode);
p += 23;
nameptr = p;
srv_put_dos_date2(p,0,create_date);
srv_put_dos_date2(p,4,adate);
srv_put_dos_date2(p,8,mdate);
- SIVAL(p,12,(uint32)file_size);
- SIVAL(p,16,(uint32)allocation_size);
+ SIVAL(p,12,(uint32_t)file_size);
+ SIVAL(p,16,(uint32_t)allocation_size);
SSVAL(p,20,mode);
{
unsigned int ea_size = estimate_ea_size(conn, NULL,
srv_put_dos_date2(p,0,create_date);
srv_put_dos_date2(p,4,adate);
srv_put_dos_date2(p,8,mdate);
- SIVAL(p,12,(uint32)file_size);
- SIVAL(p,16,(uint32)allocation_size);
+ SIVAL(p,12,(uint32_t)file_size);
+ SIVAL(p,16,(uint32_t)allocation_size);
SSVAL(p,20,mode);
p += 22; /* p now points to the EA area. */
srv_put_dos_date2(pdata,l1_fdateCreation,create_time);
srv_put_dos_date2(pdata,l1_fdateLastAccess,atime);
srv_put_dos_date2(pdata,l1_fdateLastWrite,mtime); /* write time */
- SIVAL(pdata,l1_cbFile,(uint32)file_size);
- SIVAL(pdata,l1_cbFileAlloc,(uint32)allocation_size);
+ SIVAL(pdata,l1_cbFile,(uint32_t)file_size);
+ SIVAL(pdata,l1_cbFileAlloc,(uint32_t)allocation_size);
SSVAL(pdata,l1_attrFile,mode);
break;
srv_put_dos_date2(pdata,0,create_time);
srv_put_dos_date2(pdata,4,atime);
srv_put_dos_date2(pdata,8,mtime); /* write time */
- SIVAL(pdata,12,(uint32)file_size);
- SIVAL(pdata,16,(uint32)allocation_size);
+ SIVAL(pdata,12,(uint32_t)file_size);
+ SIVAL(pdata,16,(uint32_t)allocation_size);
SSVAL(pdata,20,mode);
SIVAL(pdata,22,ea_size);
break;
return status;
}
- mod_unixmode = (uint32)unixmode | FILE_FLAG_POSIX_SEMANTICS;
+ mod_unixmode = (uint32_t)unixmode | FILE_FLAG_POSIX_SEMANTICS;
DEBUG(10,("smb_posix_mkdir: file %s, mode 0%o\n",
smb_fname_str_dbg(smb_fname), (unsigned int)unixmode));
return status;
}
- mod_unixmode = (uint32)unixmode | FILE_FLAG_POSIX_SEMANTICS;
+ mod_unixmode = (uint32_t)unixmode | FILE_FLAG_POSIX_SEMANTICS;
if (wire_open_mode & SMB_O_SYNC) {
create_options |= FILE_WRITE_THROUGH;