mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
r884: convert samba4 to use [u]int32_t instead of [u]int32
metze
(This used to be commit 0e5517d937
)
This commit is contained in:
parent
59e739a2f9
commit
f9d8f8843d
@ -130,7 +130,7 @@ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli,
|
||||
struct in_addr dest_ip;
|
||||
fstring remote_machine;
|
||||
NTSTATUS result;
|
||||
uint32 neg_flags = 0x000001ff;
|
||||
uint32_t neg_flags = 0x000001ff;
|
||||
|
||||
*retry = False;
|
||||
|
||||
|
@ -364,6 +364,8 @@ AC_CHECK_TYPE(offset_t,loff_t)
|
||||
AC_CHECK_TYPE(ssize_t, int)
|
||||
AC_CHECK_TYPE(wchar_t, unsigned short)
|
||||
AC_CHECK_TYPE(uint_t, unsigned int)
|
||||
AC_CHECK_TYPE(int32_t, long)
|
||||
AC_CHECK_TYPE(uint32_t, unsigned long)
|
||||
AC_CHECK_TYPE(int64_t, long long)
|
||||
AC_CHECK_TYPE(uint64_t, unsigned long long)
|
||||
|
||||
|
@ -2208,7 +2208,7 @@ static int cmd_reput(void)
|
||||
/*
|
||||
return a string representing a share type
|
||||
*/
|
||||
static const char *share_type_str(uint32 type)
|
||||
static const char *share_type_str(uint32_t type)
|
||||
{
|
||||
switch (type & 0xF) {
|
||||
case STYPE_DISKTREE:
|
||||
@ -2253,7 +2253,7 @@ static BOOL browse_host(const char *query_host)
|
||||
char *binding;
|
||||
NTSTATUS status;
|
||||
struct srvsvc_NetShareEnumAll r;
|
||||
uint32 resume_handle = 0;
|
||||
uint32_t resume_handle = 0;
|
||||
TALLOC_CTX *mem_ctx = talloc_init("browse_host");
|
||||
struct srvsvc_NetShareCtr1 ctr1;
|
||||
|
||||
|
@ -53,10 +53,10 @@
|
||||
*/
|
||||
typedef struct _AfpInfo
|
||||
{
|
||||
uint32 afpi_Signature; /* Must be *(PDWORD)"AFP" */
|
||||
uint32 afpi_Version; /* Must be 0x00010000 */
|
||||
uint32 afpi_Reserved1;
|
||||
uint32 afpi_BackupTime; /* Backup time for the file/dir */
|
||||
uint32_t afpi_Signature; /* Must be *(PDWORD)"AFP" */
|
||||
uint32_t afpi_Version; /* Must be 0x00010000 */
|
||||
uint32_t afpi_Reserved1;
|
||||
uint32_t afpi_BackupTime; /* Backup time for the file/dir */
|
||||
unsigned char afpi_FinderInfo[AFP_FinderSize]; /* Finder Info (32 bytes) */
|
||||
unsigned char afpi_ProDosInfo[6]; /* ProDos Info (6 bytes) # */
|
||||
unsigned char afpi_Reserved2[6];
|
||||
|
@ -118,36 +118,36 @@ it also defines lots of intermediate macros, just ignore those :-)
|
||||
#define SSVALX(buf,pos,val) (CVAL_NC(buf,pos)=(unsigned char)((val)&0xFF),CVAL_NC(buf,pos+1)=(unsigned char)((val)>>8))
|
||||
#define SIVALX(buf,pos,val) (SSVALX(buf,pos,val&0xFFFF),SSVALX(buf,pos+2,val>>16))
|
||||
#define SVALS(buf,pos) ((int16)SVAL(buf,pos))
|
||||
#define IVALS(buf,pos) ((int32)IVAL(buf,pos))
|
||||
#define IVALS(buf,pos) ((int32_t)IVAL(buf,pos))
|
||||
#define SSVAL(buf,pos,val) SSVALX((buf),(pos),((uint16)(val)))
|
||||
#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32)(val)))
|
||||
#define SIVAL(buf,pos,val) SIVALX((buf),(pos),((uint32_t)(val)))
|
||||
#define SSVALS(buf,pos,val) SSVALX((buf),(pos),((int16)(val)))
|
||||
#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32)(val)))
|
||||
#define SIVALS(buf,pos,val) SIVALX((buf),(pos),((int32_t)(val)))
|
||||
|
||||
#else /* CAREFUL_ALIGNMENT */
|
||||
|
||||
/* this handles things for architectures like the 386 that can handle
|
||||
alignment errors */
|
||||
/*
|
||||
WARNING: This section is dependent on the length of int16 and int32
|
||||
WARNING: This section is dependent on the length of int16 and int32_t
|
||||
being correct
|
||||
*/
|
||||
|
||||
/* get single value from an SMB buffer */
|
||||
#define SVAL(buf,pos) (*(const uint16 *)((const char *)(buf) + (pos)))
|
||||
#define SVAL_NC(buf,pos) (*(uint16 *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
#define IVAL(buf,pos) (*(const uint32 *)((const char *)(buf) + (pos)))
|
||||
#define IVAL_NC(buf,pos) (*(uint32 *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
#define IVAL(buf,pos) (*(const uint32_t *)((const char *)(buf) + (pos)))
|
||||
#define IVAL_NC(buf,pos) (*(uint32_t *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
#define SVALS(buf,pos) (*(const int16 *)((const char *)(buf) + (pos)))
|
||||
#define SVALS_NC(buf,pos) (*(int16 *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
#define IVALS(buf,pos) (*(const int32 *)((const char *)(buf) + (pos)))
|
||||
#define IVALS_NC(buf,pos) (*(int32 *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
#define IVALS(buf,pos) (*(const int32_t *)((const char *)(buf) + (pos)))
|
||||
#define IVALS_NC(buf,pos) (*(int32_t *)((char *)(buf) + (pos))) /* Non const version of above. */
|
||||
|
||||
/* store single value in an SMB buffer */
|
||||
#define SSVAL(buf,pos,val) SVAL_NC(buf,pos)=((uint16)(val))
|
||||
#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((uint32)(val))
|
||||
#define SIVAL(buf,pos,val) IVAL_NC(buf,pos)=((uint32_t)(val))
|
||||
#define SSVALS(buf,pos,val) SVALS_NC(buf,pos)=((int16)(val))
|
||||
#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((int32)(val))
|
||||
#define SIVALS(buf,pos,val) IVALS_NC(buf,pos)=((int32_t)(val))
|
||||
|
||||
#endif /* CAREFUL_ALIGNMENT */
|
||||
|
||||
|
@ -53,12 +53,12 @@ struct cli_negotiate {
|
||||
|
||||
int sec_mode; /* security mode returned by negprot */
|
||||
DATA_BLOB secblob; /* cryptkey or negTokenInit blob */
|
||||
uint32 sesskey;
|
||||
uint32_t sesskey;
|
||||
|
||||
smb_sign_info sign_info;
|
||||
|
||||
/* capabilities that the server reported */
|
||||
uint32 capabilities;
|
||||
uint32_t capabilities;
|
||||
|
||||
int server_zone;
|
||||
time_t server_time;
|
||||
@ -184,7 +184,7 @@ struct cli_session {
|
||||
uint16 vuid;
|
||||
|
||||
/* default pid for this session */
|
||||
uint32 pid;
|
||||
uint32_t pid;
|
||||
|
||||
DATA_BLOB user_session_key;
|
||||
};
|
||||
|
@ -280,7 +280,7 @@ struct negotiate_context {
|
||||
BOOL spnego_negotiated;
|
||||
|
||||
/* client capabilities */
|
||||
uint32 client_caps;
|
||||
uint32_t client_caps;
|
||||
|
||||
/* the timezone we sent to the client */
|
||||
int zone_offset;
|
||||
|
@ -29,7 +29,7 @@ struct debug_ops {
|
||||
void (*print_suspicious_usage)(const char* from, const char* info);
|
||||
|
||||
/* function to return process/thread id */
|
||||
uint32 (*get_task_id)(void);
|
||||
uint32_t (*get_task_id)(void);
|
||||
|
||||
/* function to log process/thread id */
|
||||
void (*log_task_id)(int fd);
|
||||
|
@ -443,7 +443,7 @@ typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
/*
|
||||
Samba needs type definitions for int16, int32, uint16 and uint32.
|
||||
Samba needs type definitions for int16, int32_t, uint16 and uint32_t.
|
||||
|
||||
Normally these are signed and unsigned 16 and 32 bit integers, but
|
||||
they actually only need to be at least 16 and 32 bits
|
||||
@ -473,40 +473,21 @@ typedef int socklen_t;
|
||||
#endif
|
||||
|
||||
#if !defined(int32)
|
||||
#if (SIZEOF_INT == 4)
|
||||
#define int32 int
|
||||
#elif (SIZEOF_LONG == 4)
|
||||
#define int32 long
|
||||
#elif (SIZEOF_SHORT == 4)
|
||||
#define int32 short
|
||||
#else
|
||||
/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */
|
||||
#define int32 int
|
||||
#define int32 int32_t
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(uint32)
|
||||
#if (SIZEOF_INT == 4)
|
||||
#define uint32 unsigned int
|
||||
#elif (SIZEOF_LONG == 4)
|
||||
#define uint32 unsigned long
|
||||
#elif (SIZEOF_SHORT == 4)
|
||||
#define uint32 unsigned short
|
||||
#else
|
||||
/* uggh - no 32 bit type?? probably a CRAY. just hope this works ... */
|
||||
#define uint32 unsigned
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if !defined(uint64)
|
||||
#define uint64 uint64_t
|
||||
#define uint32 uint32_t
|
||||
#endif
|
||||
|
||||
#if !defined(int64)
|
||||
#define int64 int64_t
|
||||
#endif
|
||||
|
||||
#if !defined(uint64)
|
||||
#define uint64 uint64_t
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Types for devices, inodes and offsets.
|
||||
*/
|
||||
|
@ -6,8 +6,8 @@
|
||||
#endif
|
||||
|
||||
struct MD5Context {
|
||||
uint32 buf[4];
|
||||
uint32 bits[2];
|
||||
uint32_t buf[4];
|
||||
uint32_t bits[2];
|
||||
unsigned char in[64];
|
||||
};
|
||||
|
||||
|
@ -293,7 +293,7 @@ struct work_record
|
||||
BOOL RunningElection;
|
||||
BOOL needelection;
|
||||
int ElectionCount;
|
||||
uint32 ElectionCriterion;
|
||||
uint32_t ElectionCriterion;
|
||||
|
||||
/* Domain master browser info. Used for efficient syncs. */
|
||||
struct nmb_name dmb_name;
|
||||
|
@ -35,21 +35,21 @@
|
||||
*/
|
||||
|
||||
#if defined(HAVE_IMMEDIATE_STRUCTURES)
|
||||
typedef struct {uint32 v;} NTSTATUS;
|
||||
typedef struct {uint32_t v;} NTSTATUS;
|
||||
#define NT_STATUS(x) ((NTSTATUS) { x })
|
||||
#define NT_STATUS_V(x) ((x).v)
|
||||
#else
|
||||
typedef uint32 NTSTATUS;
|
||||
typedef uint32_t NTSTATUS;
|
||||
#define NT_STATUS(x) (x)
|
||||
#define NT_STATUS_V(x) (x)
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_IMMEDIATE_STRUCTURES)
|
||||
typedef struct {uint32 v;} WERROR;
|
||||
typedef struct {uint32_t v;} WERROR;
|
||||
#define W_ERROR(x) ((WERROR) { x })
|
||||
#define W_ERROR_V(x) ((x).v)
|
||||
#else
|
||||
typedef uint32 WERROR;
|
||||
typedef uint32_t WERROR;
|
||||
#define W_ERROR(x) (x)
|
||||
#define W_ERROR_V(x) (x)
|
||||
#endif
|
||||
|
@ -264,7 +264,7 @@ typedef struct nt_user_token {
|
||||
/* 32 bit time (sec) since 01jan1970 - cifs6.txt, section 3.5, page 30 */
|
||||
typedef struct time_info
|
||||
{
|
||||
uint32 time;
|
||||
uint32_t time;
|
||||
} UTIME;
|
||||
|
||||
/* used to hold an arbitrary blob of data */
|
||||
@ -292,7 +292,7 @@ typedef struct userdom_struct {
|
||||
struct server_info_struct
|
||||
{
|
||||
fstring name;
|
||||
uint32 type;
|
||||
uint32_t type;
|
||||
fstring comment;
|
||||
fstring domain; /* used ONLY in ipc.c NOT namework.c */
|
||||
BOOL server_added; /* used ONLY in ipc.c NOT namework.c */
|
||||
@ -357,7 +357,7 @@ struct connections_data {
|
||||
char addr[24];
|
||||
char machine[FSTRING_LEN];
|
||||
time_t start;
|
||||
uint32 bcast_msg_flags;
|
||||
uint32_t bcast_msg_flags;
|
||||
};
|
||||
|
||||
/* the following are used by loadparm for option lists */
|
||||
@ -396,7 +396,7 @@ struct parm_struct
|
||||
};
|
||||
|
||||
struct bitmap {
|
||||
uint32 *b;
|
||||
uint32_t *b;
|
||||
unsigned int n;
|
||||
};
|
||||
|
||||
|
@ -47,7 +47,7 @@ typedef uint64_t HYPER_T;
|
||||
is used in the structure definition.
|
||||
*/
|
||||
typedef struct {
|
||||
uint32 private_length;
|
||||
uint32_t private_length;
|
||||
const char *s;
|
||||
} WIRE_STRING;
|
||||
|
||||
@ -62,10 +62,10 @@ struct smb_seek {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint16 mode;
|
||||
int32 offset; /* signed */
|
||||
int32_t offset; /* signed */
|
||||
} in;
|
||||
struct {
|
||||
int32 offset;
|
||||
int32_t offset;
|
||||
} out;
|
||||
};
|
||||
|
||||
@ -146,7 +146,7 @@ union smb_rename {
|
||||
struct {
|
||||
uint16 attrib;
|
||||
uint16 flags; /* see RENAME_FLAG_* */
|
||||
uint32 cluster_size;
|
||||
uint32_t cluster_size;
|
||||
const char *old_name;
|
||||
const char *new_name;
|
||||
} in;
|
||||
@ -208,8 +208,8 @@ union smb_sesssetup {
|
||||
enum sesssetup_level level;
|
||||
|
||||
struct {
|
||||
uint32 sesskey;
|
||||
uint32 capabilities;
|
||||
uint32_t sesskey;
|
||||
uint32_t capabilities;
|
||||
const char *password;
|
||||
const char *user;
|
||||
const char *domain;
|
||||
@ -230,7 +230,7 @@ union smb_sesssetup {
|
||||
uint16 bufsize;
|
||||
uint16 mpx_max;
|
||||
uint16 vc_num;
|
||||
uint32 sesskey;
|
||||
uint32_t sesskey;
|
||||
DATA_BLOB password;
|
||||
const char *user;
|
||||
const char *domain;
|
||||
@ -254,8 +254,8 @@ union smb_sesssetup {
|
||||
uint16 bufsize;
|
||||
uint16 mpx_max;
|
||||
uint16 vc_num;
|
||||
uint32 sesskey;
|
||||
uint32 capabilities;
|
||||
uint32_t sesskey;
|
||||
uint32_t capabilities;
|
||||
DATA_BLOB password1;
|
||||
DATA_BLOB password2;
|
||||
const char *user;
|
||||
@ -281,8 +281,8 @@ union smb_sesssetup {
|
||||
uint16 bufsize;
|
||||
uint16 mpx_max;
|
||||
uint16 vc_num;
|
||||
uint32 sesskey;
|
||||
uint32 capabilities;
|
||||
uint32_t sesskey;
|
||||
uint32_t capabilities;
|
||||
DATA_BLOB secblob;
|
||||
const char *os;
|
||||
const char *lanman;
|
||||
@ -354,7 +354,7 @@ union smb_fileinfo {
|
||||
|
||||
struct {
|
||||
uint16 attrib;
|
||||
uint32 ea_size;
|
||||
uint32_t ea_size;
|
||||
uint_t num_eas;
|
||||
struct ea_struct {
|
||||
uint8 flags;
|
||||
@ -365,10 +365,10 @@ union smb_fileinfo {
|
||||
NTTIME access_time;
|
||||
NTTIME write_time;
|
||||
NTTIME change_time;
|
||||
uint32 ex_attrib;
|
||||
uint32_t ex_attrib;
|
||||
uint64_t alloc_size;
|
||||
uint64_t size;
|
||||
uint32 nlink;
|
||||
uint32_t nlink;
|
||||
WIRE_STRING fname;
|
||||
WIRE_STRING alt_fname;
|
||||
uint8 delete_pending;
|
||||
@ -379,11 +379,11 @@ union smb_fileinfo {
|
||||
uint8 chunk_shift;
|
||||
uint8 cluster_shift;
|
||||
uint64_t file_id;
|
||||
uint32 access_flags; /* seen 0x001f01ff from w2k3 */
|
||||
uint32_t access_flags; /* seen 0x001f01ff from w2k3 */
|
||||
uint64_t position;
|
||||
uint32 mode;
|
||||
uint32 alignment_requirement;
|
||||
uint32 reparse_tag;
|
||||
uint32_t mode;
|
||||
uint32_t alignment_requirement;
|
||||
uint32_t reparse_tag;
|
||||
uint_t num_streams;
|
||||
struct stream_struct {
|
||||
uint64_t size;
|
||||
@ -402,7 +402,7 @@ union smb_fileinfo {
|
||||
|
||||
struct {
|
||||
uint16 attrib;
|
||||
uint32 size;
|
||||
uint32_t size;
|
||||
time_t write_time;
|
||||
} out;
|
||||
} getattr;
|
||||
@ -416,8 +416,8 @@ union smb_fileinfo {
|
||||
time_t create_time;
|
||||
time_t access_time;
|
||||
time_t write_time;
|
||||
uint32 size;
|
||||
uint32 alloc_size;
|
||||
uint32_t size;
|
||||
uint32_t alloc_size;
|
||||
uint16 attrib;
|
||||
} out;
|
||||
} getattre;
|
||||
@ -431,8 +431,8 @@ union smb_fileinfo {
|
||||
time_t create_time;
|
||||
time_t access_time;
|
||||
time_t write_time;
|
||||
uint32 size;
|
||||
uint32 alloc_size;
|
||||
uint32_t size;
|
||||
uint32_t alloc_size;
|
||||
uint16 attrib;
|
||||
} out;
|
||||
} standard;
|
||||
@ -446,10 +446,10 @@ union smb_fileinfo {
|
||||
time_t create_time;
|
||||
time_t access_time;
|
||||
time_t write_time;
|
||||
uint32 size;
|
||||
uint32 alloc_size;
|
||||
uint32_t size;
|
||||
uint32_t alloc_size;
|
||||
uint16 attrib;
|
||||
uint32 ea_size;
|
||||
uint32_t ea_size;
|
||||
} out;
|
||||
} ea_size;
|
||||
|
||||
@ -482,7 +482,7 @@ union smb_fileinfo {
|
||||
NTTIME access_time;
|
||||
NTTIME write_time;
|
||||
NTTIME change_time;
|
||||
uint32 attrib;
|
||||
uint32_t attrib;
|
||||
} out;
|
||||
} basic_info;
|
||||
|
||||
@ -495,7 +495,7 @@ union smb_fileinfo {
|
||||
struct {
|
||||
uint64_t alloc_size;
|
||||
uint64_t size;
|
||||
uint32 nlink;
|
||||
uint32_t nlink;
|
||||
BOOL delete_pending;
|
||||
BOOL directory;
|
||||
} out;
|
||||
@ -507,7 +507,7 @@ union smb_fileinfo {
|
||||
union smb_fileinfo_in in;
|
||||
|
||||
struct {
|
||||
uint32 ea_size;
|
||||
uint32_t ea_size;
|
||||
} out;
|
||||
} ea_info;
|
||||
|
||||
@ -531,13 +531,13 @@ union smb_fileinfo {
|
||||
NTTIME access_time;
|
||||
NTTIME write_time;
|
||||
NTTIME change_time;
|
||||
uint32 attrib;
|
||||
uint32_t attrib;
|
||||
uint64_t alloc_size;
|
||||
uint64_t size;
|
||||
uint32 nlink;
|
||||
uint32_t nlink;
|
||||
uint8 delete_pending;
|
||||
uint8 directory;
|
||||
uint32 ea_size;
|
||||
uint32_t ea_size;
|
||||
WIRE_STRING fname;
|
||||
} out;
|
||||
} all_info;
|
||||
@ -590,7 +590,7 @@ union smb_fileinfo {
|
||||
NTTIME change_time;
|
||||
uint64_t uid;
|
||||
uint64_t gid;
|
||||
uint32 file_type;
|
||||
uint32_t file_type;
|
||||
uint64_t dev_major;
|
||||
uint64_t dev_minor;
|
||||
uint64_t unique_id;
|
||||
@ -625,7 +625,7 @@ union smb_fileinfo {
|
||||
union smb_fileinfo_in in;
|
||||
|
||||
struct {
|
||||
uint32 access_flags; /* seen 0x001f01ff from w2k3 */
|
||||
uint32_t access_flags; /* seen 0x001f01ff from w2k3 */
|
||||
} out;
|
||||
} access_information;
|
||||
|
||||
@ -645,7 +645,7 @@ union smb_fileinfo {
|
||||
union smb_fileinfo_in in;
|
||||
|
||||
struct {
|
||||
uint32 mode;
|
||||
uint32_t mode;
|
||||
} out;
|
||||
} mode_information;
|
||||
|
||||
@ -655,7 +655,7 @@ union smb_fileinfo {
|
||||
union smb_fileinfo_in in;
|
||||
|
||||
struct {
|
||||
uint32 alignment_requirement;
|
||||
uint32_t alignment_requirement;
|
||||
} out;
|
||||
} alignment_information;
|
||||
|
||||
@ -671,7 +671,7 @@ union smb_fileinfo {
|
||||
NTTIME change_time;
|
||||
uint64_t alloc_size;
|
||||
uint64_t size;
|
||||
uint32 attrib;
|
||||
uint32_t attrib;
|
||||
} out;
|
||||
} network_open_information;
|
||||
|
||||
@ -682,8 +682,8 @@ union smb_fileinfo {
|
||||
union smb_fileinfo_in in;
|
||||
|
||||
struct {
|
||||
uint32 attrib;
|
||||
uint32 reparse_tag;
|
||||
uint32_t attrib;
|
||||
uint32_t reparse_tag;
|
||||
} out;
|
||||
} attribute_tag_information;
|
||||
};
|
||||
@ -787,7 +787,7 @@ union smb_setfileinfo {
|
||||
NTTIME access_time;
|
||||
NTTIME write_time;
|
||||
NTTIME change_time;
|
||||
uint32 attrib;
|
||||
uint32_t attrib;
|
||||
} in;
|
||||
} basic_info;
|
||||
|
||||
@ -832,7 +832,7 @@ union smb_setfileinfo {
|
||||
|
||||
struct {
|
||||
uint8 overwrite;
|
||||
uint32 root_fid;
|
||||
uint32_t root_fid;
|
||||
const char *new_name;
|
||||
} in;
|
||||
} rename_information;
|
||||
@ -854,7 +854,7 @@ union smb_setfileinfo {
|
||||
|
||||
struct {
|
||||
/* valid values seem to be 0, 2, 4 and 6 */
|
||||
uint32 mode;
|
||||
uint32_t mode;
|
||||
} in;
|
||||
} mode_information;
|
||||
|
||||
@ -865,7 +865,7 @@ union smb_setfileinfo {
|
||||
enum setfileinfo_level level;
|
||||
union setfileinfo_file file;
|
||||
struct {
|
||||
uint32 mode; /* yuck - this field remains to fix compile of libcli/clifile.c */
|
||||
uint32_t mode; /* yuck - this field remains to fix compile of libcli/clifile.c */
|
||||
uint64_t end_of_file;
|
||||
uint64_t num_bytes;
|
||||
NTTIME status_change_time;
|
||||
@ -873,7 +873,7 @@ union smb_setfileinfo {
|
||||
NTTIME change_time;
|
||||
uint64_t uid;
|
||||
uint64_t gid;
|
||||
uint32 file_type;
|
||||
uint32_t file_type;
|
||||
uint64_t dev_major;
|
||||
uint64_t dev_minor;
|
||||
uint64_t unique_id;
|
||||
@ -919,16 +919,16 @@ union smb_fsinfo {
|
||||
enum fsinfo_level level;
|
||||
|
||||
struct {
|
||||
uint32 block_size;
|
||||
uint32_t block_size;
|
||||
uint64_t blocks_total;
|
||||
uint64_t blocks_free;
|
||||
uint32 fs_id;
|
||||
uint32_t fs_id;
|
||||
NTTIME create_time;
|
||||
uint32 serial_number;
|
||||
uint32 fs_attr;
|
||||
uint32 max_file_component_length;
|
||||
uint32 device_type;
|
||||
uint32 device_characteristics;
|
||||
uint32_t serial_number;
|
||||
uint32_t fs_attr;
|
||||
uint32_t max_file_component_length;
|
||||
uint32_t device_type;
|
||||
uint32_t device_characteristics;
|
||||
uint64_t quota_soft;
|
||||
uint64_t quota_hard;
|
||||
uint64_t quota_flags;
|
||||
@ -955,10 +955,10 @@ union smb_fsinfo {
|
||||
enum fsinfo_level level;
|
||||
|
||||
struct {
|
||||
uint32 fs_id;
|
||||
uint32 sectors_per_unit;
|
||||
uint32 total_alloc_units;
|
||||
uint32 avail_alloc_units;
|
||||
uint32_t fs_id;
|
||||
uint32_t sectors_per_unit;
|
||||
uint32_t total_alloc_units;
|
||||
uint32_t avail_alloc_units;
|
||||
uint16 bytes_per_sector;
|
||||
} out;
|
||||
} allocation;
|
||||
@ -968,7 +968,7 @@ union smb_fsinfo {
|
||||
enum fsinfo_level level;
|
||||
|
||||
struct {
|
||||
uint32 serial_number;
|
||||
uint32_t serial_number;
|
||||
WIRE_STRING volume_name;
|
||||
} out;
|
||||
} volume;
|
||||
@ -979,7 +979,7 @@ union smb_fsinfo {
|
||||
|
||||
struct {
|
||||
NTTIME create_time;
|
||||
uint32 serial_number;
|
||||
uint32_t serial_number;
|
||||
WIRE_STRING volume_name;
|
||||
} out;
|
||||
} volume_info;
|
||||
@ -991,8 +991,8 @@ union smb_fsinfo {
|
||||
struct {
|
||||
uint64_t total_alloc_units;
|
||||
uint64_t avail_alloc_units; /* maps to call_avail_alloc_units */
|
||||
uint32 sectors_per_unit;
|
||||
uint32 bytes_per_sector;
|
||||
uint32_t sectors_per_unit;
|
||||
uint32_t bytes_per_sector;
|
||||
} out;
|
||||
} size_info;
|
||||
|
||||
@ -1001,8 +1001,8 @@ union smb_fsinfo {
|
||||
enum fsinfo_level level;
|
||||
|
||||
struct {
|
||||
uint32 device_type;
|
||||
uint32 characteristics;
|
||||
uint32_t device_type;
|
||||
uint32_t characteristics;
|
||||
} out;
|
||||
} device_info;
|
||||
|
||||
@ -1012,8 +1012,8 @@ union smb_fsinfo {
|
||||
enum fsinfo_level level;
|
||||
|
||||
struct {
|
||||
uint32 fs_attr;
|
||||
uint32 max_file_component_length;
|
||||
uint32_t fs_attr;
|
||||
uint32_t max_file_component_length;
|
||||
WIRE_STRING fs_type;
|
||||
} out;
|
||||
} attribute_info;
|
||||
@ -1050,8 +1050,8 @@ union smb_fsinfo {
|
||||
uint64_t total_alloc_units;
|
||||
uint64_t call_avail_alloc_units;
|
||||
uint64_t actual_avail_alloc_units;
|
||||
uint32 sectors_per_unit;
|
||||
uint32 bytes_per_sector;
|
||||
uint32_t sectors_per_unit;
|
||||
uint32_t bytes_per_sector;
|
||||
} out;
|
||||
} full_size_information;
|
||||
|
||||
@ -1083,15 +1083,15 @@ union smb_open {
|
||||
enum open_level level;
|
||||
|
||||
struct {
|
||||
uint32 flags;
|
||||
uint32 root_fid;
|
||||
uint32 access_mask;
|
||||
uint32_t flags;
|
||||
uint32_t root_fid;
|
||||
uint32_t access_mask;
|
||||
uint64_t alloc_size;
|
||||
uint32 file_attr;
|
||||
uint32 share_access;
|
||||
uint32 open_disposition;
|
||||
uint32 create_options;
|
||||
uint32 impersonation;
|
||||
uint32_t file_attr;
|
||||
uint32_t share_access;
|
||||
uint32_t open_disposition;
|
||||
uint32_t create_options;
|
||||
uint32_t impersonation;
|
||||
uint8 security_flags;
|
||||
const char *fname;
|
||||
} in;
|
||||
@ -1099,12 +1099,12 @@ union smb_open {
|
||||
struct {
|
||||
uint8 oplock_level;
|
||||
uint16 fnum;
|
||||
uint32 create_action;
|
||||
uint32_t create_action;
|
||||
NTTIME create_time;
|
||||
NTTIME access_time;
|
||||
NTTIME write_time;
|
||||
NTTIME change_time;
|
||||
uint32 attrib;
|
||||
uint32_t attrib;
|
||||
uint64_t alloc_size;
|
||||
uint64_t size;
|
||||
uint16 file_type;
|
||||
@ -1123,8 +1123,8 @@ union smb_open {
|
||||
uint16 file_attrs;
|
||||
time_t write_time;
|
||||
uint16 open_func;
|
||||
uint32 size;
|
||||
uint32 timeout;
|
||||
uint32_t size;
|
||||
uint32_t timeout;
|
||||
const char *fname;
|
||||
uint_t num_eas;
|
||||
struct ea_struct *eas;
|
||||
@ -1134,12 +1134,12 @@ union smb_open {
|
||||
uint16 fnum;
|
||||
uint16 attrib;
|
||||
time_t write_time;
|
||||
uint32 size;
|
||||
uint32_t size;
|
||||
uint16 access;
|
||||
uint16 ftype;
|
||||
uint16 devstate;
|
||||
uint16 action;
|
||||
uint32 unknown;
|
||||
uint32_t unknown;
|
||||
} out;
|
||||
} t2open;
|
||||
|
||||
@ -1156,7 +1156,7 @@ union smb_open {
|
||||
uint16 fnum;
|
||||
uint16 attrib;
|
||||
time_t write_time;
|
||||
uint32 size;
|
||||
uint32_t size;
|
||||
uint16 rmode;
|
||||
} out;
|
||||
} open;
|
||||
@ -1172,24 +1172,24 @@ union smb_open {
|
||||
uint16 file_attrs;
|
||||
time_t write_time; /* not honoured by win2003 */
|
||||
uint16 open_func;
|
||||
uint32 size; /* note that this sets the
|
||||
uint32_t size; /* note that this sets the
|
||||
initial file size, not
|
||||
just allocation size */
|
||||
uint32 timeout; /* not honoured by win2003 */
|
||||
uint32_t timeout; /* not honoured by win2003 */
|
||||
const char *fname;
|
||||
} in;
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint16 attrib;
|
||||
time_t write_time;
|
||||
uint32 size;
|
||||
uint32_t size;
|
||||
uint16 access;
|
||||
uint16 ftype;
|
||||
uint16 devstate;
|
||||
uint16 action;
|
||||
uint32 unique_fid;
|
||||
uint32 access_mask;
|
||||
uint32 unknown;
|
||||
uint32_t unique_fid;
|
||||
uint32_t access_mask;
|
||||
uint32_t unknown;
|
||||
} out;
|
||||
} openx;
|
||||
|
||||
@ -1255,11 +1255,11 @@ union smb_read {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint64_t offset;
|
||||
uint32 size;
|
||||
uint32_t size;
|
||||
} in;
|
||||
struct {
|
||||
char *data;
|
||||
uint32 nread;
|
||||
uint32_t nread;
|
||||
} out;
|
||||
} generic;
|
||||
|
||||
@ -1273,11 +1273,11 @@ union smb_read {
|
||||
uint64_t offset;
|
||||
uint16 maxcnt;
|
||||
uint16 mincnt;
|
||||
uint32 timeout;
|
||||
uint32_t timeout;
|
||||
} in;
|
||||
struct {
|
||||
char *data;
|
||||
uint32 nread;
|
||||
uint32_t nread;
|
||||
} out;
|
||||
} readbraw;
|
||||
|
||||
@ -1289,7 +1289,7 @@ union smb_read {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint16 count;
|
||||
uint32 offset;
|
||||
uint32_t offset;
|
||||
uint16 remaining;
|
||||
} in;
|
||||
struct {
|
||||
@ -1305,7 +1305,7 @@ union smb_read {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint16 count;
|
||||
uint32 offset;
|
||||
uint32_t offset;
|
||||
uint16 remaining;
|
||||
} in;
|
||||
struct {
|
||||
@ -1348,11 +1348,11 @@ union smb_write {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint64_t offset;
|
||||
uint32 count;
|
||||
uint32_t count;
|
||||
const char *data;
|
||||
} in;
|
||||
struct {
|
||||
uint32 nwritten;
|
||||
uint32_t nwritten;
|
||||
} out;
|
||||
} generic;
|
||||
|
||||
@ -1364,12 +1364,12 @@ union smb_write {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint16 count;
|
||||
uint32 offset;
|
||||
uint32_t offset;
|
||||
uint16 remaining;
|
||||
const char *data;
|
||||
} in;
|
||||
struct {
|
||||
uint32 nwritten;
|
||||
uint32_t nwritten;
|
||||
} out;
|
||||
} writeunlock;
|
||||
|
||||
@ -1380,7 +1380,7 @@ union smb_write {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint16 count;
|
||||
uint32 offset;
|
||||
uint32_t offset;
|
||||
uint16 remaining;
|
||||
const char *data;
|
||||
} in;
|
||||
@ -1398,11 +1398,11 @@ union smb_write {
|
||||
uint64_t offset;
|
||||
uint16 wmode;
|
||||
uint16 remaining;
|
||||
uint32 count;
|
||||
uint32_t count;
|
||||
const char *data;
|
||||
} in;
|
||||
struct {
|
||||
uint32 nwritten;
|
||||
uint32_t nwritten;
|
||||
uint16 remaining;
|
||||
} out;
|
||||
} writex;
|
||||
@ -1414,7 +1414,7 @@ union smb_write {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint16 count;
|
||||
uint32 offset;
|
||||
uint32_t offset;
|
||||
time_t mtime;
|
||||
const char *data;
|
||||
} in;
|
||||
@ -1453,8 +1453,8 @@ union smb_lock {
|
||||
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint32 count;
|
||||
uint32 offset;
|
||||
uint32_t count;
|
||||
uint32_t offset;
|
||||
} in;
|
||||
} lock;
|
||||
|
||||
@ -1464,8 +1464,8 @@ union smb_lock {
|
||||
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint32 count;
|
||||
uint32 offset;
|
||||
uint32_t count;
|
||||
uint32_t offset;
|
||||
} in;
|
||||
} unlock;
|
||||
|
||||
@ -1476,7 +1476,7 @@ union smb_lock {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint16 mode;
|
||||
uint32 timeout;
|
||||
uint32_t timeout;
|
||||
uint16 ulock_cnt;
|
||||
uint16 lock_cnt;
|
||||
struct smb_lock_entry {
|
||||
@ -1553,7 +1553,7 @@ union smb_lpq {
|
||||
time_t time;
|
||||
uint8 status;
|
||||
uint16 job;
|
||||
uint32 size;
|
||||
uint32_t size;
|
||||
char *user;
|
||||
} *queue;
|
||||
} out;
|
||||
@ -1577,7 +1577,7 @@ union smb_ioctl {
|
||||
enum ioctl_level level;
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint32 request;
|
||||
uint32_t request;
|
||||
} in;
|
||||
struct {
|
||||
DATA_BLOB blob;
|
||||
@ -1589,7 +1589,7 @@ union smb_ioctl {
|
||||
struct {
|
||||
enum ioctl_level level;
|
||||
struct {
|
||||
uint32 function;
|
||||
uint32_t function;
|
||||
uint16 fnum;
|
||||
BOOL fsctl;
|
||||
uint8 filter;
|
||||
@ -1630,7 +1630,7 @@ struct smb_trans2 {
|
||||
uint16 max_data;
|
||||
uint8 max_setup;
|
||||
uint16 flags;
|
||||
uint32 timeout;
|
||||
uint32_t timeout;
|
||||
uint8 setup_count;
|
||||
uint16 *setup;
|
||||
const char *trans_name; /* SMBtrans only */
|
||||
@ -1650,9 +1650,9 @@ struct smb_trans2 {
|
||||
struct smb_nttrans {
|
||||
struct {
|
||||
uint8 max_setup;
|
||||
uint32 max_param;
|
||||
uint32 max_data;
|
||||
uint32 setup_count;
|
||||
uint32_t max_param;
|
||||
uint32_t max_data;
|
||||
uint32_t setup_count;
|
||||
uint16 function;
|
||||
uint16 *setup;
|
||||
DATA_BLOB params;
|
||||
@ -1671,16 +1671,16 @@ struct smb_nttrans {
|
||||
/* struct for nttrans change notify call */
|
||||
struct smb_notify {
|
||||
struct {
|
||||
uint32 buffer_size;
|
||||
uint32 completion_filter;
|
||||
uint32_t buffer_size;
|
||||
uint32_t completion_filter;
|
||||
uint16 fnum;
|
||||
BOOL recursive;
|
||||
} in;
|
||||
|
||||
struct {
|
||||
uint32 num_changes;
|
||||
uint32_t num_changes;
|
||||
struct {
|
||||
uint32 action;
|
||||
uint32_t action;
|
||||
WIRE_STRING name;
|
||||
} *changes;
|
||||
} out;
|
||||
@ -1729,7 +1729,7 @@ union smb_search_first {
|
||||
uint16 search_attrib;
|
||||
uint16 max_count;
|
||||
uint16 flags;
|
||||
uint32 storage_type;
|
||||
uint32_t storage_type;
|
||||
const char *pattern;
|
||||
} in;
|
||||
struct {
|
||||
@ -1767,7 +1767,7 @@ union smb_search_next {
|
||||
struct {
|
||||
uint16 handle;
|
||||
uint16 max_count;
|
||||
uint32 resume_key;
|
||||
uint32_t resume_key;
|
||||
uint16 flags;
|
||||
const char *last_name;
|
||||
} in;
|
||||
@ -1784,110 +1784,110 @@ union smb_search_data {
|
||||
struct {
|
||||
uint16 attrib;
|
||||
time_t write_time;
|
||||
uint32 size;
|
||||
uint32_t size;
|
||||
DATA_BLOB search_id; /* used to resume search from this point */
|
||||
char *name;
|
||||
} search;
|
||||
|
||||
/* trans2 findfirst RAW_SEARCH_STANDARD level */
|
||||
struct {
|
||||
uint32 resume_key;
|
||||
uint32_t resume_key;
|
||||
time_t create_time;
|
||||
time_t access_time;
|
||||
time_t write_time;
|
||||
uint32 size;
|
||||
uint32 alloc_size;
|
||||
uint32_t size;
|
||||
uint32_t alloc_size;
|
||||
uint16 attrib;
|
||||
WIRE_STRING name;
|
||||
} standard;
|
||||
|
||||
/* trans2 findfirst RAW_SEARCH_EA_SIZE level */
|
||||
struct {
|
||||
uint32 resume_key;
|
||||
uint32_t resume_key;
|
||||
time_t create_time;
|
||||
time_t access_time;
|
||||
time_t write_time;
|
||||
uint32 size;
|
||||
uint32 alloc_size;
|
||||
uint32_t size;
|
||||
uint32_t alloc_size;
|
||||
uint16 attrib;
|
||||
uint32 ea_size;
|
||||
uint32_t ea_size;
|
||||
WIRE_STRING name;
|
||||
} ea_size;
|
||||
|
||||
/* RAW_SEARCH_DIRECTORY_INFO interface */
|
||||
struct {
|
||||
uint32 file_index;
|
||||
uint32_t file_index;
|
||||
NTTIME create_time;
|
||||
NTTIME access_time;
|
||||
NTTIME write_time;
|
||||
NTTIME change_time;
|
||||
uint64_t size;
|
||||
uint64_t alloc_size;
|
||||
uint32 attrib;
|
||||
uint32_t attrib;
|
||||
WIRE_STRING name;
|
||||
} directory_info;
|
||||
|
||||
/* RAW_SEARCH_FULL_DIRECTORY_INFO interface */
|
||||
struct {
|
||||
uint32 file_index;
|
||||
uint32_t file_index;
|
||||
NTTIME create_time;
|
||||
NTTIME access_time;
|
||||
NTTIME write_time;
|
||||
NTTIME change_time;
|
||||
uint64_t size;
|
||||
uint64_t alloc_size;
|
||||
uint32 attrib;
|
||||
uint32 ea_size;
|
||||
uint32_t attrib;
|
||||
uint32_t ea_size;
|
||||
WIRE_STRING name;
|
||||
} full_directory_info;
|
||||
|
||||
/* RAW_SEARCH_NAME_INFO interface */
|
||||
struct {
|
||||
uint32 file_index;
|
||||
uint32_t file_index;
|
||||
WIRE_STRING name;
|
||||
} name_info;
|
||||
|
||||
/* RAW_SEARCH_BOTH_DIRECTORY_INFO interface */
|
||||
struct {
|
||||
uint32 file_index;
|
||||
uint32_t file_index;
|
||||
NTTIME create_time;
|
||||
NTTIME access_time;
|
||||
NTTIME write_time;
|
||||
NTTIME change_time;
|
||||
uint64_t size;
|
||||
uint64_t alloc_size;
|
||||
uint32 attrib;
|
||||
uint32 ea_size;
|
||||
uint32_t attrib;
|
||||
uint32_t ea_size;
|
||||
WIRE_STRING short_name;
|
||||
WIRE_STRING name;
|
||||
} both_directory_info;
|
||||
|
||||
/* RAW_SEARCH_ID_FULL_DIRECTORY_INFO interface */
|
||||
struct {
|
||||
uint32 file_index;
|
||||
uint32_t file_index;
|
||||
NTTIME create_time;
|
||||
NTTIME access_time;
|
||||
NTTIME write_time;
|
||||
NTTIME change_time;
|
||||
uint64_t size;
|
||||
uint64_t alloc_size;
|
||||
uint32 attrib;
|
||||
uint32 ea_size;
|
||||
uint32_t attrib;
|
||||
uint32_t ea_size;
|
||||
uint64_t file_id;
|
||||
WIRE_STRING name;
|
||||
} id_full_directory_info;
|
||||
|
||||
/* RAW_SEARCH_ID_BOTH_DIRECTORY_INFO interface */
|
||||
struct {
|
||||
uint32 file_index;
|
||||
uint32_t file_index;
|
||||
NTTIME create_time;
|
||||
NTTIME access_time;
|
||||
NTTIME write_time;
|
||||
NTTIME change_time;
|
||||
uint64_t size;
|
||||
uint64_t alloc_size;
|
||||
uint32 attrib;
|
||||
uint32 ea_size;
|
||||
uint32_t attrib;
|
||||
uint32_t ea_size;
|
||||
uint64_t file_id;
|
||||
WIRE_STRING short_name;
|
||||
WIRE_STRING name;
|
||||
@ -1895,7 +1895,7 @@ union smb_search_data {
|
||||
|
||||
/* RAW_SEARCH_UNIX_INFO interface */
|
||||
struct {
|
||||
uint32 file_index;
|
||||
uint32_t file_index;
|
||||
uint64_t size;
|
||||
uint64_t alloc_size;
|
||||
NTTIME status_change_time;
|
||||
@ -1903,7 +1903,7 @@ union smb_search_data {
|
||||
NTTIME change_time;
|
||||
uint64_t uid;
|
||||
uint64_t gid;
|
||||
uint32 file_type;
|
||||
uint32_t file_type;
|
||||
uint64_t dev_major;
|
||||
uint64_t dev_minor;
|
||||
uint64_t unique_id;
|
||||
|
@ -152,7 +152,7 @@ true if two IP addresses are equal
|
||||
Used by dptr_zero.
|
||||
****************************************************************************/
|
||||
|
||||
#define DPTR_MASK ((uint32)(((uint32)1)<<31))
|
||||
#define DPTR_MASK ((uint32_t)(((uint32_t)1)<<31))
|
||||
|
||||
/****************************************************************************
|
||||
Return True if the offset is at zero.
|
||||
|
@ -35,7 +35,7 @@ struct bitmap *bitmap_allocate(int n)
|
||||
if (!bm) return NULL;
|
||||
|
||||
bm->n = n;
|
||||
bm->b = (uint32 *)malloc(sizeof(bm->b[0])*(n+31)/32);
|
||||
bm->b = (uint32_t *)malloc(sizeof(bm->b[0])*(n+31)/32);
|
||||
if (!bm->b) {
|
||||
SAFE_FREE(bm);
|
||||
return NULL;
|
||||
@ -73,7 +73,7 @@ struct bitmap *bitmap_talloc(TALLOC_CTX *mem_ctx, int n)
|
||||
if (!bm) return NULL;
|
||||
|
||||
bm->n = n;
|
||||
bm->b = (uint32 *)talloc(mem_ctx, sizeof(bm->b[0])*(n+31)/32);
|
||||
bm->b = (uint32_t *)talloc(mem_ctx, sizeof(bm->b[0])*(n+31)/32);
|
||||
if (!bm->b) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -55,9 +55,9 @@ static const unsigned long CRCTable[256] =
|
||||
0xB40BBE37,0xC30C8EA1,0x5A05DF1B,0x2D02EF8D
|
||||
};
|
||||
|
||||
uint32 crc32_calc_buffer( const char *buffer, uint32 count)
|
||||
uint32_t crc32_calc_buffer( const char *buffer, uint32_t count)
|
||||
{
|
||||
uint32 crc=0xffffffff, i;
|
||||
uint32_t crc=0xffffffff, i;
|
||||
for(i=0;i<count;i++)
|
||||
crc = (crc>>8) ^ CRCTable[(buffer[i] ^ crc) & 0xff];
|
||||
crc^=0xffffffff;
|
||||
|
@ -26,40 +26,40 @@
|
||||
*/
|
||||
|
||||
struct mdfour_state {
|
||||
uint32 A, B, C, D;
|
||||
uint32_t A, B, C, D;
|
||||
};
|
||||
|
||||
static uint32 F(uint32 X, uint32 Y, uint32 Z)
|
||||
static uint32_t F(uint32_t X, uint32_t Y, uint32_t Z)
|
||||
{
|
||||
return (X&Y) | ((~X)&Z);
|
||||
}
|
||||
|
||||
static uint32 G(uint32 X, uint32 Y, uint32 Z)
|
||||
static uint32_t G(uint32_t X, uint32_t Y, uint32_t Z)
|
||||
{
|
||||
return (X&Y) | (X&Z) | (Y&Z);
|
||||
}
|
||||
|
||||
static uint32 H(uint32 X, uint32 Y, uint32 Z)
|
||||
static uint32_t H(uint32_t X, uint32_t Y, uint32_t Z)
|
||||
{
|
||||
return X^Y^Z;
|
||||
}
|
||||
|
||||
static uint32 lshift(uint32 x, int s)
|
||||
static uint32_t lshift(uint32_t x, int s)
|
||||
{
|
||||
x &= 0xFFFFFFFF;
|
||||
return ((x<<s)&0xFFFFFFFF) | (x>>(32-s));
|
||||
}
|
||||
|
||||
#define ROUND1(a,b,c,d,k,s) a = lshift(a + F(b,c,d) + X[k], s)
|
||||
#define ROUND2(a,b,c,d,k,s) a = lshift(a + G(b,c,d) + X[k] + (uint32)0x5A827999,s)
|
||||
#define ROUND3(a,b,c,d,k,s) a = lshift(a + H(b,c,d) + X[k] + (uint32)0x6ED9EBA1,s)
|
||||
#define ROUND2(a,b,c,d,k,s) a = lshift(a + G(b,c,d) + X[k] + (uint32_t)0x5A827999,s)
|
||||
#define ROUND3(a,b,c,d,k,s) a = lshift(a + H(b,c,d) + X[k] + (uint32_t)0x6ED9EBA1,s)
|
||||
|
||||
/* this applies md4 to 64 byte chunks */
|
||||
static void mdfour64(struct mdfour_state *s, uint32 *M)
|
||||
static void mdfour64(struct mdfour_state *s, uint32_t *M)
|
||||
{
|
||||
int j;
|
||||
uint32 AA, BB, CC, DD;
|
||||
uint32 X[16];
|
||||
uint32_t AA, BB, CC, DD;
|
||||
uint32_t X[16];
|
||||
|
||||
for (j=0;j<16;j++)
|
||||
X[j] = M[j];
|
||||
@ -107,7 +107,7 @@ static void mdfour64(struct mdfour_state *s, uint32 *M)
|
||||
X[j] = 0;
|
||||
}
|
||||
|
||||
static void copy64(uint32 *M, const unsigned char *in)
|
||||
static void copy64(uint32_t *M, const unsigned char *in)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -116,7 +116,7 @@ static void copy64(uint32 *M, const unsigned char *in)
|
||||
(in[i*4+1]<<8) | (in[i*4+0]<<0);
|
||||
}
|
||||
|
||||
static void copy4(unsigned char *out, uint32 x)
|
||||
static void copy4(unsigned char *out, uint32_t x)
|
||||
{
|
||||
out[0] = x&0xFF;
|
||||
out[1] = (x>>8)&0xFF;
|
||||
@ -128,8 +128,8 @@ static void copy4(unsigned char *out, uint32 x)
|
||||
void mdfour(unsigned char *out, const unsigned char *in, int n)
|
||||
{
|
||||
unsigned char buf[128];
|
||||
uint32 M[16];
|
||||
uint32 b = n * 8;
|
||||
uint32_t M[16];
|
||||
uint32_t b = n * 8;
|
||||
int i;
|
||||
struct mdfour_state state;
|
||||
|
||||
|
@ -22,18 +22,18 @@
|
||||
|
||||
#include "md5.h"
|
||||
|
||||
static void MD5Transform(uint32 buf[4], uint32 const in[16]);
|
||||
static void MD5Transform(uint32_t buf[4], uint32_t const in[16]);
|
||||
|
||||
/*
|
||||
* Note: this code is harmless on little-endian machines.
|
||||
*/
|
||||
static void byteReverse(unsigned char *buf, unsigned longs)
|
||||
{
|
||||
uint32 t;
|
||||
uint32_t t;
|
||||
do {
|
||||
t = (uint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
|
||||
t = (uint32_t) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
|
||||
((unsigned) buf[1] << 8 | buf[0]);
|
||||
*(uint32 *) buf = t;
|
||||
*(uint32_t *) buf = t;
|
||||
buf += 4;
|
||||
} while (--longs);
|
||||
}
|
||||
@ -59,12 +59,12 @@ void MD5Init(struct MD5Context *ctx)
|
||||
*/
|
||||
void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
|
||||
{
|
||||
register uint32 t;
|
||||
register uint32_t t;
|
||||
|
||||
/* Update bitcount */
|
||||
|
||||
t = ctx->bits[0];
|
||||
if ((ctx->bits[0] = t + ((uint32) len << 3)) < t)
|
||||
if ((ctx->bits[0] = t + ((uint32_t) len << 3)) < t)
|
||||
ctx->bits[1]++; /* Carry from low to high */
|
||||
ctx->bits[1] += len >> 29;
|
||||
|
||||
@ -82,7 +82,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
|
||||
}
|
||||
memmove(p, buf, t);
|
||||
byteReverse(ctx->in, 16);
|
||||
MD5Transform(ctx->buf, (uint32 *) ctx->in);
|
||||
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
|
||||
buf += t;
|
||||
len -= t;
|
||||
}
|
||||
@ -91,7 +91,7 @@ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len)
|
||||
while (len >= 64) {
|
||||
memmove(ctx->in, buf, 64);
|
||||
byteReverse(ctx->in, 16);
|
||||
MD5Transform(ctx->buf, (uint32 *) ctx->in);
|
||||
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
|
||||
buf += 64;
|
||||
len -= 64;
|
||||
}
|
||||
@ -126,7 +126,7 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
|
||||
/* Two lots of padding: Pad the first block to 64 bytes */
|
||||
memset(p, 0, count);
|
||||
byteReverse(ctx->in, 16);
|
||||
MD5Transform(ctx->buf, (uint32 *) ctx->in);
|
||||
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
|
||||
|
||||
/* Now fill the next block with 56 bytes */
|
||||
memset(ctx->in, 0, 56);
|
||||
@ -137,10 +137,10 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
|
||||
byteReverse(ctx->in, 14);
|
||||
|
||||
/* Append length in bits and transform */
|
||||
((uint32 *) ctx->in)[14] = ctx->bits[0];
|
||||
((uint32 *) ctx->in)[15] = ctx->bits[1];
|
||||
((uint32_t *) ctx->in)[14] = ctx->bits[0];
|
||||
((uint32_t *) ctx->in)[15] = ctx->bits[1];
|
||||
|
||||
MD5Transform(ctx->buf, (uint32 *) ctx->in);
|
||||
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
|
||||
byteReverse((unsigned char *) ctx->buf, 4);
|
||||
memmove(digest, ctx->buf, 16);
|
||||
memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
|
||||
@ -163,9 +163,9 @@ void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
|
||||
* reflect the addition of 16 longwords of new data. MD5Update blocks
|
||||
* the data and converts bytes into longwords for this routine.
|
||||
*/
|
||||
static void MD5Transform(uint32 buf[4], uint32 const in[16])
|
||||
static void MD5Transform(uint32_t buf[4], uint32_t const in[16])
|
||||
{
|
||||
register uint32 a, b, c, d;
|
||||
register uint32_t a, b, c, d;
|
||||
|
||||
a = buf[0];
|
||||
b = buf[1];
|
||||
|
@ -141,7 +141,7 @@ void print_suspicious_usage(const char* from, const char* info)
|
||||
}
|
||||
}
|
||||
|
||||
uint32 get_task_id(void)
|
||||
uint32_t get_task_id(void)
|
||||
{
|
||||
if (debug_handlers.ops.get_task_id) {
|
||||
return debug_handlers.ops.get_task_id();
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "includes.h"
|
||||
|
||||
static unsigned char hash[258];
|
||||
static uint32 counter;
|
||||
static uint32_t counter;
|
||||
static unsigned char *reseed_data;
|
||||
static size_t reseed_data_size;
|
||||
|
||||
@ -134,7 +134,7 @@ static void do_filehash(const char *fname, unsigned char *the_hash)
|
||||
static int do_reseed(BOOL use_fd, int fd)
|
||||
{
|
||||
unsigned char seed_inbuf[40];
|
||||
uint32 v1, v2; struct timeval tval; pid_t mypid;
|
||||
uint32_t v1, v2; struct timeval tval; pid_t mypid;
|
||||
|
||||
if (use_fd) {
|
||||
if (fd != -1)
|
||||
|
@ -28,7 +28,7 @@ struct in_addr loopback_ip;
|
||||
|
||||
static struct interface *local_interfaces;
|
||||
|
||||
#define ALLONES ((uint32)0xFFFFFFFF)
|
||||
#define ALLONES ((uint32_t)0xFFFFFFFF)
|
||||
#define MKBCADDR(_IP, _NM) ((_IP & _NM) | (_NM ^ ALLONES))
|
||||
#define MKNETADDR(_IP, _NM) (_IP & _NM)
|
||||
|
||||
|
@ -474,7 +474,7 @@ void message_deregister(int msg_type)
|
||||
|
||||
struct msg_all {
|
||||
int msg_type;
|
||||
uint32 msg_flag;
|
||||
uint32_t msg_flag;
|
||||
const void *buf;
|
||||
size_t len;
|
||||
BOOL duplicates;
|
||||
|
@ -508,7 +508,7 @@ WERROR reg_key_add_name_recursive(REG_KEY *parent, const char *path)
|
||||
return WERR_OK;
|
||||
}
|
||||
|
||||
WERROR reg_key_add_name(REG_KEY *parent, const char *name, uint32 access_mask, SEC_DESC *desc, REG_KEY **newkey)
|
||||
WERROR reg_key_add_name(REG_KEY *parent, const char *name, uint32_t access_mask, SEC_DESC *desc, REG_KEY **newkey)
|
||||
{
|
||||
WERROR error;
|
||||
|
||||
|
@ -85,7 +85,7 @@ char *reg_val_name( REG_VAL *val )
|
||||
/**********************************************************************
|
||||
*********************************************************************/
|
||||
|
||||
uint32 reg_val_type( REG_VAL *val )
|
||||
uint32_t reg_val_type( REG_VAL *val )
|
||||
{
|
||||
return val->data_type;
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ WERROR reg_key_get_subkey_val(REG_KEY *key, const char *subname, const char *val
|
||||
return reg_key_get_value_by_name(k, valname, val);
|
||||
}
|
||||
|
||||
WERROR reg_key_set_subkey_val(REG_KEY *key, const char *subname, const char *valname, uint32 type, uint8 *data, int real_len)
|
||||
WERROR reg_key_set_subkey_val(REG_KEY *key, const char *subname, const char *valname, uint32_t type, uint8 *data, int real_len)
|
||||
{
|
||||
REG_KEY *k;
|
||||
REG_VAL *v;
|
||||
|
@ -107,7 +107,7 @@ struct registry_ops {
|
||||
WERROR (*request_value_change_notify) (REG_VAL *, value_notification_function);
|
||||
|
||||
/* Key management */
|
||||
WERROR (*add_key)(REG_KEY *, const char *name, uint32 access_mask, SEC_DESC *, REG_KEY **);
|
||||
WERROR (*add_key)(REG_KEY *, const char *name, uint32_t access_mask, SEC_DESC *, REG_KEY **);
|
||||
WERROR (*del_key)(REG_KEY *);
|
||||
|
||||
/* Value management */
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "includes.h"
|
||||
#include "lib/registry/common/registry.h"
|
||||
|
||||
static WERROR reg_dir_add_key(REG_KEY *parent, const char *name, uint32 access_mask, SEC_DESC *desc, REG_KEY **result)
|
||||
static WERROR reg_dir_add_key(REG_KEY *parent, const char *name, uint32_t access_mask, SEC_DESC *desc, REG_KEY **result)
|
||||
{
|
||||
char *path;
|
||||
int ret;
|
||||
|
@ -501,7 +501,7 @@ static DWORD str_to_dword(const char *a) {
|
||||
/*
|
||||
* Create an ACE
|
||||
*/
|
||||
static BOOL nt_create_ace(SEC_ACE *ace, int type, int flags, uint32 perms, const char *sid)
|
||||
static BOOL nt_create_ace(SEC_ACE *ace, int type, int flags, uint32_t perms, const char *sid)
|
||||
{
|
||||
DOM_SID s;
|
||||
SEC_ACCESS access;
|
||||
|
@ -197,7 +197,7 @@ static WERROR rpc_get_value_by_index(REG_KEY *parent, int n, REG_VAL **value)
|
||||
struct winreg_EnumValueName vn;
|
||||
NTSTATUS status;
|
||||
struct rpc_key_data *mykeydata;
|
||||
uint32 type = 0x0, requested_len = 0, returned_len = 0;
|
||||
uint32_t type = 0x0, requested_len = 0, returned_len = 0;
|
||||
WERROR error;
|
||||
|
||||
error = rpc_key_put_rpc_data(parent, &mykeydata);
|
||||
@ -283,7 +283,7 @@ static WERROR rpc_get_subkey_by_index(REG_KEY *parent, int n, REG_KEY **subkey)
|
||||
return r.out.result;
|
||||
}
|
||||
|
||||
static WERROR rpc_add_key(REG_KEY *parent, const char *name, uint32 access_mask, SEC_DESC *sec, REG_KEY **key)
|
||||
static WERROR rpc_add_key(REG_KEY *parent, const char *name, uint32_t access_mask, SEC_DESC *sec, REG_KEY **key)
|
||||
{
|
||||
struct rpc_key_data *mykeydata;
|
||||
WERROR error;
|
||||
|
@ -410,7 +410,7 @@ struct hostent *sys_gethostbyname(const char *name)
|
||||
/**************************************************************************
|
||||
Try and abstract process capabilities (for systems that have them).
|
||||
****************************************************************************/
|
||||
static BOOL set_process_capability( uint32 cap_flag, BOOL enable )
|
||||
static BOOL set_process_capability( uint32_t cap_flag, BOOL enable )
|
||||
{
|
||||
if(cap_flag == KERNEL_OPLOCK_CAPABILITY) {
|
||||
cap_t cap = cap_get_proc();
|
||||
@ -444,7 +444,7 @@ static BOOL set_process_capability( uint32 cap_flag, BOOL enable )
|
||||
Try and abstract inherited process capabilities (for systems that have them).
|
||||
****************************************************************************/
|
||||
|
||||
static BOOL set_inherited_process_capability( uint32 cap_flag, BOOL enable )
|
||||
static BOOL set_inherited_process_capability( uint32_t cap_flag, BOOL enable )
|
||||
{
|
||||
if(cap_flag == KERNEL_OPLOCK_CAPABILITY) {
|
||||
cap_t cap = cap_get_proc();
|
||||
|
@ -180,15 +180,15 @@ void tdb_read_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval)
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
Fetch a int32 value by a arbitrary blob key, return -1 if not found.
|
||||
Output is int32 in native byte order.
|
||||
Fetch a int32_t value by a arbitrary blob key, return -1 if not found.
|
||||
Output is int32_t in native byte order.
|
||||
****************************************************************************/
|
||||
|
||||
int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len)
|
||||
int32_t tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len)
|
||||
{
|
||||
TDB_DATA key = make_tdb_data(keyval, len);
|
||||
TDB_DATA data;
|
||||
int32 ret;
|
||||
int32_t ret;
|
||||
|
||||
data = tdb_fetch(tdb, key);
|
||||
if (!data.dptr || data.dsize != sizeof(int32)) {
|
||||
@ -202,25 +202,25 @@ int32 tdb_fetch_int32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len)
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Fetch a int32 value by string key, return -1 if not found.
|
||||
Output is int32 in native byte order.
|
||||
Fetch a int32_t value by string key, return -1 if not found.
|
||||
Output is int32_t in native byte order.
|
||||
****************************************************************************/
|
||||
|
||||
int32 tdb_fetch_int32(TDB_CONTEXT *tdb, const char *keystr)
|
||||
int32_t tdb_fetch_int32(TDB_CONTEXT *tdb, const char *keystr)
|
||||
{
|
||||
return tdb_fetch_int32_byblob(tdb, keystr, strlen(keystr) + 1);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Store a int32 value by an arbitary blob key, return 0 on success, -1 on failure.
|
||||
Input is int32 in native byte order. Output in tdb is in little-endian.
|
||||
Store a int32_t value by an arbitary blob key, return 0 on success, -1 on failure.
|
||||
Input is int32_t in native byte order. Output in tdb is in little-endian.
|
||||
****************************************************************************/
|
||||
|
||||
int tdb_store_int32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, int32 v)
|
||||
int tdb_store_int32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, int32_t v)
|
||||
{
|
||||
TDB_DATA key = make_tdb_data(keystr, len);
|
||||
TDB_DATA data;
|
||||
int32 v_store;
|
||||
int32_t v_store;
|
||||
|
||||
SIVAL(&v_store,0,v);
|
||||
data.dptr = (void *)&v_store;
|
||||
@ -230,21 +230,21 @@ int tdb_store_int32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, int
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Store a int32 value by string key, return 0 on success, -1 on failure.
|
||||
Input is int32 in native byte order. Output in tdb is in little-endian.
|
||||
Store a int32_t value by string key, return 0 on success, -1 on failure.
|
||||
Input is int32_t in native byte order. Output in tdb is in little-endian.
|
||||
****************************************************************************/
|
||||
|
||||
int tdb_store_int32(TDB_CONTEXT *tdb, const char *keystr, int32 v)
|
||||
int tdb_store_int32(TDB_CONTEXT *tdb, const char *keystr, int32_t v)
|
||||
{
|
||||
return tdb_store_int32_byblob(tdb, keystr, strlen(keystr) + 1, v);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Fetch a uint32 value by a arbitrary blob key, return -1 if not found.
|
||||
Output is uint32 in native byte order.
|
||||
Fetch a uint32_t value by a arbitrary blob key, return -1 if not found.
|
||||
Output is uint32_t in native byte order.
|
||||
****************************************************************************/
|
||||
|
||||
BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len, uint32 *value)
|
||||
BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len, uint32_t *value)
|
||||
{
|
||||
TDB_DATA key = make_tdb_data(keyval, len);
|
||||
TDB_DATA data;
|
||||
@ -261,25 +261,25 @@ BOOL tdb_fetch_uint32_byblob(TDB_CONTEXT *tdb, const char *keyval, size_t len, u
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Fetch a uint32 value by string key, return -1 if not found.
|
||||
Output is uint32 in native byte order.
|
||||
Fetch a uint32_t value by string key, return -1 if not found.
|
||||
Output is uint32_t in native byte order.
|
||||
****************************************************************************/
|
||||
|
||||
BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 *value)
|
||||
BOOL tdb_fetch_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32_t *value)
|
||||
{
|
||||
return tdb_fetch_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Store a uint32 value by an arbitary blob key, return 0 on success, -1 on failure.
|
||||
Input is uint32 in native byte order. Output in tdb is in little-endian.
|
||||
Store a uint32_t value by an arbitary blob key, return 0 on success, -1 on failure.
|
||||
Input is uint32_t in native byte order. Output in tdb is in little-endian.
|
||||
****************************************************************************/
|
||||
|
||||
BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, uint32 value)
|
||||
BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, uint32_t value)
|
||||
{
|
||||
TDB_DATA key = make_tdb_data(keystr, len);
|
||||
TDB_DATA data;
|
||||
uint32 v_store;
|
||||
uint32_t v_store;
|
||||
BOOL ret = True;
|
||||
|
||||
SIVAL(&v_store, 0, value);
|
||||
@ -293,11 +293,11 @@ BOOL tdb_store_uint32_byblob(TDB_CONTEXT *tdb, const char *keystr, size_t len, u
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Store a uint32 value by string key, return 0 on success, -1 on failure.
|
||||
Input is uint32 in native byte order. Output in tdb is in little-endian.
|
||||
Store a uint32_t value by string key, return 0 on success, -1 on failure.
|
||||
Input is uint32_t in native byte order. Output in tdb is in little-endian.
|
||||
****************************************************************************/
|
||||
|
||||
BOOL tdb_store_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32 value)
|
||||
BOOL tdb_store_uint32(TDB_CONTEXT *tdb, const char *keystr, uint32_t value)
|
||||
{
|
||||
return tdb_store_uint32_byblob(tdb, keystr, strlen(keystr) + 1, value);
|
||||
}
|
||||
@ -340,10 +340,10 @@ int tdb_delete_bystring(TDB_CONTEXT *tdb, const char *keystr)
|
||||
Atomic integer change. Returns old value. To create, set initial value in *oldval.
|
||||
****************************************************************************/
|
||||
|
||||
int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, const char *keystr, int32 *oldval, int32 change_val)
|
||||
int32_t tdb_change_int32_atomic(TDB_CONTEXT *tdb, const char *keystr, int32_t *oldval, int32_t change_val)
|
||||
{
|
||||
int32 val;
|
||||
int32 ret = -1;
|
||||
int32_t val;
|
||||
int32_t ret = -1;
|
||||
|
||||
if (tdb_lock_bystring(tdb, keystr,0) == -1)
|
||||
return -1;
|
||||
@ -381,9 +381,9 @@ int32 tdb_change_int32_atomic(TDB_CONTEXT *tdb, const char *keystr, int32 *oldva
|
||||
Atomic unsigned integer change. Returns old value. To create, set initial value in *oldval.
|
||||
****************************************************************************/
|
||||
|
||||
BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr, uint32 *oldval, uint32 change_val)
|
||||
BOOL tdb_change_uint32_atomic(TDB_CONTEXT *tdb, const char *keystr, uint32_t *oldval, uint32_t change_val)
|
||||
{
|
||||
uint32 val;
|
||||
uint32_t val;
|
||||
BOOL ret = False;
|
||||
|
||||
if (tdb_lock_bystring(tdb, keystr,0) == -1)
|
||||
@ -429,7 +429,7 @@ size_t tdb_pack(TDB_CONTEXT *tdb, char *buf, int bufsize, const char *fmt, ...)
|
||||
va_list ap;
|
||||
uint8 bt;
|
||||
uint16 w;
|
||||
uint32 d;
|
||||
uint32_t d;
|
||||
int i;
|
||||
void *p;
|
||||
int len;
|
||||
@ -523,7 +523,7 @@ int tdb_unpack(TDB_CONTEXT *tdb, char *buf, int bufsize, const char *fmt, ...)
|
||||
va_list ap;
|
||||
uint8 *bt;
|
||||
uint16 *w;
|
||||
uint32 *d;
|
||||
uint32_t *d;
|
||||
int len;
|
||||
int *i;
|
||||
void **p;
|
||||
@ -553,7 +553,7 @@ int tdb_unpack(TDB_CONTEXT *tdb, char *buf, int bufsize, const char *fmt, ...)
|
||||
break;
|
||||
case 'd':
|
||||
len = 4;
|
||||
d = va_arg(ap, uint32 *);
|
||||
d = va_arg(ap, uint32_t *);
|
||||
if (bufsize < len)
|
||||
goto no_space;
|
||||
*d = IVAL(buf, 0);
|
||||
|
@ -164,10 +164,10 @@ static uint16 make_dos_time1(struct tm *t)
|
||||
create a 32 bit dos packed date/time from some parameters
|
||||
This takes a GMT time and returns a packed localtime structure
|
||||
********************************************************************/
|
||||
static uint32 make_dos_date(time_t unixdate, int zone_offset)
|
||||
static uint32_t make_dos_date(time_t unixdate, int zone_offset)
|
||||
{
|
||||
struct tm *t;
|
||||
uint32 ret=0;
|
||||
uint32_t ret=0;
|
||||
|
||||
if (unixdate == 0) {
|
||||
return 0;
|
||||
@ -192,7 +192,7 @@ This takes GMT time and puts local time in the buffer
|
||||
********************************************************************/
|
||||
void push_dos_date(char *buf, int offset, time_t unixdate, int zone_offset)
|
||||
{
|
||||
uint32 x = make_dos_date(unixdate, zone_offset);
|
||||
uint32_t x = make_dos_date(unixdate, zone_offset);
|
||||
SIVAL(buf,offset,x);
|
||||
}
|
||||
|
||||
@ -202,7 +202,7 @@ This takes GMT time and puts local time in the buffer
|
||||
********************************************************************/
|
||||
void push_dos_date2(char *buf,int offset,time_t unixdate, int zone_offset)
|
||||
{
|
||||
uint32 x;
|
||||
uint32_t x;
|
||||
x = make_dos_date(unixdate, zone_offset);
|
||||
x = ((x&0xFFFF)<<16) | ((x&0xFFFF0000)>>16);
|
||||
SIVAL(buf,offset,x);
|
||||
@ -224,9 +224,9 @@ void push_dos_date3(char *buf,int offset,time_t unixdate, int zone_offset)
|
||||
/*******************************************************************
|
||||
interpret a 32 bit dos packed date/time to some parameters
|
||||
********************************************************************/
|
||||
static void interpret_dos_date(uint32 date,int *year,int *month,int *day,int *hour,int *minute,int *second)
|
||||
static void interpret_dos_date(uint32_t date,int *year,int *month,int *day,int *hour,int *minute,int *second)
|
||||
{
|
||||
uint32 p0,p1,p2,p3;
|
||||
uint32_t p0,p1,p2,p3;
|
||||
|
||||
p0=date&0xFF; p1=((date&0xFF00)>>8)&0xFF;
|
||||
p2=((date&0xFF0000)>>16)&0xFF; p3=((date&0xFF000000)>>24)&0xFF;
|
||||
@ -245,7 +245,7 @@ static void interpret_dos_date(uint32 date,int *year,int *month,int *day,int *ho
|
||||
********************************************************************/
|
||||
time_t pull_dos_date(const uint8 *date_ptr, int zone_offset)
|
||||
{
|
||||
uint32 dos_date=0;
|
||||
uint32_t dos_date=0;
|
||||
struct tm t;
|
||||
time_t ret;
|
||||
|
||||
@ -269,7 +269,7 @@ like make_unix_date() but the words are reversed
|
||||
********************************************************************/
|
||||
time_t pull_dos_date2(const uint8 *date_ptr, int zone_offset)
|
||||
{
|
||||
uint32 x,x2;
|
||||
uint32_t x,x2;
|
||||
|
||||
x = IVAL(date_ptr,0);
|
||||
x2 = ((x&0xFFFF)<<16) | ((x&0xFFFF0000)>>16);
|
||||
|
@ -426,10 +426,10 @@ BOOL is_ipaddress(const char *str)
|
||||
Interpret an internet address or name into an IP address in 4 byte form.
|
||||
****************************************************************************/
|
||||
|
||||
uint32 interpret_addr(const char *str)
|
||||
uint32_t interpret_addr(const char *str)
|
||||
{
|
||||
struct hostent *hp;
|
||||
uint32 res;
|
||||
uint32_t res;
|
||||
|
||||
if (strcmp(str,"0.0.0.0") == 0)
|
||||
return(0);
|
||||
@ -454,7 +454,7 @@ uint32 interpret_addr(const char *str)
|
||||
putip((char *)&res,(char *)hp->h_addr);
|
||||
}
|
||||
|
||||
if (res == (uint32)-1)
|
||||
if (res == (uint32_t)-1)
|
||||
return(0);
|
||||
|
||||
return(res);
|
||||
@ -467,7 +467,7 @@ uint32 interpret_addr(const char *str)
|
||||
struct in_addr *interpret_addr2(TALLOC_CTX *mem_ctx, const char *str)
|
||||
{
|
||||
struct in_addr *ret;
|
||||
uint32 a = interpret_addr(str);
|
||||
uint32_t a = interpret_addr(str);
|
||||
|
||||
ret = talloc(mem_ctx, sizeof(struct in_addr));
|
||||
if (!ret) return NULL;
|
||||
@ -481,7 +481,7 @@ struct in_addr *interpret_addr2(TALLOC_CTX *mem_ctx, const char *str)
|
||||
|
||||
BOOL is_zero_ip(struct in_addr ip)
|
||||
{
|
||||
uint32 a;
|
||||
uint32_t a;
|
||||
putip((char *)&a,(char *)&ip);
|
||||
return(a == 0);
|
||||
}
|
||||
@ -503,7 +503,7 @@ void zero_ip(struct in_addr *ip)
|
||||
|
||||
BOOL same_net(struct in_addr ip1,struct in_addr ip2,struct in_addr mask)
|
||||
{
|
||||
uint32 net1,net2,nmask;
|
||||
uint32_t net1,net2,nmask;
|
||||
|
||||
nmask = ntohl(mask.s_addr);
|
||||
net1 = ntohl(ip1.s_addr);
|
||||
|
@ -78,7 +78,7 @@ static const struct {
|
||||
{SID_NAME_USE_NONE, NULL}
|
||||
};
|
||||
|
||||
const char *sid_type_lookup(uint32 sid_type)
|
||||
const char *sid_type_lookup(uint32_t sid_type)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@ -147,7 +147,7 @@ void generate_wellknown_sids(void)
|
||||
Return the last rid from the end of a sid
|
||||
*****************************************************************/
|
||||
|
||||
BOOL sid_peek_rid(const struct dom_sid *sid, uint32 *rid)
|
||||
BOOL sid_peek_rid(const struct dom_sid *sid, uint32_t *rid)
|
||||
{
|
||||
if (!sid || !rid)
|
||||
return False;
|
||||
@ -164,7 +164,7 @@ BOOL sid_peek_rid(const struct dom_sid *sid, uint32 *rid)
|
||||
and check the sid against the exp_dom_sid
|
||||
*****************************************************************/
|
||||
|
||||
BOOL sid_peek_check_rid(const struct dom_sid *exp_dom_sid, const struct dom_sid *sid, uint32 *rid)
|
||||
BOOL sid_peek_check_rid(const struct dom_sid *exp_dom_sid, const struct dom_sid *sid, uint32_t *rid)
|
||||
{
|
||||
if (!exp_dom_sid || !sid || !rid)
|
||||
return False;
|
||||
@ -285,7 +285,7 @@ size_t sid_size(const struct dom_sid *sid)
|
||||
if (sid == NULL)
|
||||
return 0;
|
||||
|
||||
return sid->num_auths * sizeof(uint32) + 8;
|
||||
return sid->num_auths * sizeof(uint32_t) + 8;
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
|
@ -250,7 +250,7 @@ BOOL send_nbt_keepalive(int sock_fd)
|
||||
/****************************************************************************
|
||||
Open a socket of the specified type, port, and address for incoming data.
|
||||
****************************************************************************/
|
||||
int open_socket_in( int type, int port, int dlevel, uint32 socket_addr, BOOL rebind )
|
||||
int open_socket_in( int type, int port, int dlevel, uint32_t socket_addr, BOOL rebind )
|
||||
{
|
||||
struct sockaddr_in sock;
|
||||
int res;
|
||||
|
@ -35,7 +35,7 @@ NTSTATUS ads_name_to_sid(ADS_STRUCT *ads,
|
||||
ADS_STATUS rc;
|
||||
void *res = NULL;
|
||||
char *ldap_exp;
|
||||
uint32 t;
|
||||
uint32_t t;
|
||||
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
|
||||
char *escaped_name = escape_ldap_string_alloc(name);
|
||||
char *escaped_realm = escape_ldap_string_alloc(ads->config.realm);
|
||||
@ -70,7 +70,7 @@ NTSTATUS ads_name_to_sid(ADS_STRUCT *ads,
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!ads_pull_uint32(ads, res, "sAMAccountType", &t)) {
|
||||
if (!ads_pull_uint32_t(ads, res, "sAMAccountType", &t)) {
|
||||
DEBUG(1,("No sAMAccountType for %s !?\n", name));
|
||||
goto done;
|
||||
}
|
||||
@ -104,7 +104,7 @@ NTSTATUS ads_sid_to_name(ADS_STRUCT *ads,
|
||||
void *msg = NULL;
|
||||
char *ldap_exp = NULL;
|
||||
char *sidstr = NULL;
|
||||
uint32 atype;
|
||||
uint32_t atype;
|
||||
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
|
||||
|
||||
if (!(sidstr = sid_binstring(sid))) {
|
||||
@ -126,7 +126,7 @@ NTSTATUS ads_sid_to_name(ADS_STRUCT *ads,
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!ads_pull_uint32(ads, msg, "sAMAccountType", &atype)) {
|
||||
if (!ads_pull_uint32_t(ads, msg, "sAMAccountType", &atype)) {
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ NTSTATUS ads_ntstatus(ADS_STATUS status)
|
||||
*/
|
||||
const char *ads_errstr(ADS_STATUS status)
|
||||
{
|
||||
uint32 msg_ctx;
|
||||
uint32_t msg_ctx;
|
||||
static char *ret;
|
||||
|
||||
SAFE_FREE(ret);
|
||||
@ -116,7 +116,7 @@ const char *ads_errstr(ADS_STATUS status)
|
||||
#ifdef HAVE_GSSAPI
|
||||
case ENUM_ADS_ERROR_GSS:
|
||||
{
|
||||
uint32 minor;
|
||||
uint32_t minor;
|
||||
|
||||
gss_buffer_desc msg1, msg2;
|
||||
msg1.value = NULL;
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "includes.h"
|
||||
|
||||
static struct perm_mask_str {
|
||||
uint32 mask;
|
||||
uint32_t mask;
|
||||
const char *str;
|
||||
} perms[] = {
|
||||
{SEC_RIGHTS_FULL_CTRL, "[Full Control]"},
|
||||
@ -50,7 +50,7 @@ static struct perm_mask_str {
|
||||
};
|
||||
|
||||
/* convert a security permissions into a string */
|
||||
static void ads_disp_perms(uint32 type)
|
||||
static void ads_disp_perms(uint32_t type)
|
||||
{
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
|
@ -985,7 +985,7 @@ char *ads_ou_string(const char *org_unit)
|
||||
add a machine account to the ADS server
|
||||
*/
|
||||
static ADS_STATUS ads_add_machine_acct(ADS_STRUCT *ads, const char *hostname,
|
||||
uint32 account_type,
|
||||
uint32_t account_type,
|
||||
const char *org_unit)
|
||||
{
|
||||
ADS_STATUS ret, status;
|
||||
@ -1107,7 +1107,7 @@ static void dump_binary(const char *field, struct berval **values)
|
||||
}
|
||||
|
||||
struct uuid {
|
||||
uint32 i1;
|
||||
uint32_t i1;
|
||||
uint16 i2;
|
||||
uint16 i3;
|
||||
uint8 s[8];
|
||||
@ -1314,7 +1314,7 @@ int ads_count_replies(ADS_STRUCT *ads, void *res)
|
||||
* @return status of join
|
||||
**/
|
||||
ADS_STATUS ads_join_realm(ADS_STRUCT *ads, const char *hostname,
|
||||
uint32 account_type, const char *org_unit)
|
||||
uint32_t account_type, const char *org_unit)
|
||||
{
|
||||
ADS_STATUS status;
|
||||
LDAPMessage *res;
|
||||
@ -1737,15 +1737,15 @@ char **ads_pull_strings_range(ADS_STRUCT *ads,
|
||||
}
|
||||
|
||||
/**
|
||||
* pull a single uint32 from a ADS result
|
||||
* pull a single uint32_t from a ADS result
|
||||
* @param ads connection to ads server
|
||||
* @param msg Results of search
|
||||
* @param field Attribute to retrieve
|
||||
* @param v Pointer to int to store result
|
||||
* @return boolean inidicating success
|
||||
*/
|
||||
BOOL ads_pull_uint32(ADS_STRUCT *ads,
|
||||
void *msg, const char *field, uint32 *v)
|
||||
BOOL ads_pull_uint32_t(ADS_STRUCT *ads,
|
||||
void *msg, const char *field, uint32_t *v)
|
||||
{
|
||||
char **values;
|
||||
|
||||
@ -1921,7 +1921,7 @@ char *ads_pull_username(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, void *msg)
|
||||
* @param usn Pointer to retrieved update serial number
|
||||
* @return status of search
|
||||
**/
|
||||
ADS_STATUS ads_USN(ADS_STRUCT *ads, uint32 *usn)
|
||||
ADS_STATUS ads_USN(ADS_STRUCT *ads, uint32_t *usn)
|
||||
{
|
||||
const char *attrs[] = {"highestCommittedUSN", NULL};
|
||||
ADS_STATUS status;
|
||||
@ -1935,7 +1935,7 @@ ADS_STATUS ads_USN(ADS_STRUCT *ads, uint32 *usn)
|
||||
return ADS_ERROR(LDAP_NO_RESULTS_RETURNED);
|
||||
}
|
||||
|
||||
ads_pull_uint32(ads, res, "highestCommittedUSN", usn);
|
||||
ads_pull_uint32_t(ads, res, "highestCommittedUSN", usn);
|
||||
ads_msgfree(ads, res);
|
||||
return ADS_SUCCESS;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ static BOOL map_dword(TALLOC_CTX *ctx, ADS_MODLIST *mods,
|
||||
|
||||
if (value->type != REG_DWORD)
|
||||
return False;
|
||||
str_value = talloc_asprintf(ctx, "%d", *((uint32 *) value->data_p));
|
||||
str_value = talloc_asprintf(ctx, "%d", *((uint32_t *) value->data_p));
|
||||
status = ads_mod_str(ctx, mods, value->valuename, str_value);
|
||||
return ADS_ERR_OK(status);
|
||||
}
|
||||
@ -148,7 +148,7 @@ static BOOL map_multi_sz(TALLOC_CTX *ctx, ADS_MODLIST *mods,
|
||||
{
|
||||
char **str_values = NULL;
|
||||
smb_ucs2_t *cur_str = (smb_ucs2_t *) value->data_p;
|
||||
uint32 size = 0, num_vals = 0, i=0;
|
||||
uint32_t size = 0, num_vals = 0, i=0;
|
||||
ADS_STATUS status;
|
||||
|
||||
if (value->type != REG_MULTI_SZ)
|
||||
@ -268,7 +268,7 @@ WERROR get_remote_printer_publishing_data(struct cli_state *cli,
|
||||
char *printername, *servername;
|
||||
REGVAL_CTR dsdriver_ctr, dsspooler_ctr;
|
||||
BOOL got_dsdriver = False, got_dsspooler = False;
|
||||
uint32 needed, i;
|
||||
uint32_t needed, i;
|
||||
POLICY_HND pol;
|
||||
|
||||
asprintf(&servername, "\\\\%s", cli->desthost);
|
||||
@ -341,7 +341,7 @@ BOOL get_local_printer_publishing_data(TALLOC_CTX *mem_ctx,
|
||||
ADS_MODLIST *mods,
|
||||
NT_PRINTER_DATA *data)
|
||||
{
|
||||
uint32 key,val;
|
||||
uint32_t key,val;
|
||||
|
||||
for (key=0; key < data->num_keys; key++) {
|
||||
REGVAL_CTR ctr = data->keys[key].values;
|
||||
|
@ -33,7 +33,7 @@ static ADS_STATUS ads_sasl_spnego_ntlmssp_bind(ADS_STRUCT *ads)
|
||||
DATA_BLOB blob, chal1, chal2, auth;
|
||||
uint8 challenge[8];
|
||||
uint8 nthash[24], lmhash[24], sess_key[16];
|
||||
uint32 neg_flags;
|
||||
uint32_t neg_flags;
|
||||
struct berval cred, *scred;
|
||||
ADS_STATUS status;
|
||||
int rc;
|
||||
@ -234,19 +234,19 @@ failed:
|
||||
*/
|
||||
static ADS_STATUS ads_sasl_gssapi_bind(ADS_STRUCT *ads)
|
||||
{
|
||||
uint32 minor_status;
|
||||
uint32_t minor_status;
|
||||
gss_name_t serv_name;
|
||||
gss_buffer_desc input_name;
|
||||
gss_ctx_id_t context_handle;
|
||||
gss_OID mech_type = GSS_C_NULL_OID;
|
||||
gss_buffer_desc output_token, input_token;
|
||||
uint32 ret_flags, conf_state;
|
||||
uint32_t ret_flags, conf_state;
|
||||
struct berval cred;
|
||||
struct berval *scred;
|
||||
int i=0;
|
||||
int gss_rc, rc;
|
||||
uint8 *p;
|
||||
uint32 max_msg_size;
|
||||
uint32_t max_msg_size;
|
||||
char *sname;
|
||||
unsigned sec_layer;
|
||||
ADS_STATUS status;
|
||||
|
@ -29,7 +29,7 @@ ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_princip
|
||||
char *new_password;
|
||||
char *service_principal = NULL;
|
||||
ADS_STATUS ret;
|
||||
uint32 sec_channel_type;
|
||||
uint32_t sec_channel_type;
|
||||
|
||||
if ((password = secrets_fetch_machine_password(lp_workgroup(), NULL, &sec_channel_type)) == NULL) {
|
||||
DEBUG(1,("Failed to retrieve password for principal %s\n", host_principal));
|
||||
|
@ -34,7 +34,7 @@ static void creds_init(struct creds_CredentialState *creds,
|
||||
const uint8 machine_password[16])
|
||||
{
|
||||
struct netr_Credential time_cred;
|
||||
uint32 sum[2];
|
||||
uint32_t sum[2];
|
||||
uint8 sum2[8];
|
||||
|
||||
dump_data_pw("Client chall", client_challenge->data, sizeof(client_challenge->data));
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
struct creds_CredentialState {
|
||||
uint8 session_key[8];
|
||||
uint32 sequence;
|
||||
uint32_t sequence;
|
||||
struct netr_Credential seed;
|
||||
struct netr_Credential client;
|
||||
struct netr_Credential server;
|
||||
|
@ -62,7 +62,7 @@ static const struct ntlmssp_callbacks {
|
||||
* @param neg_flags The flags from the packet
|
||||
*/
|
||||
|
||||
void debug_ntlmssp_flags(uint32 neg_flags)
|
||||
void debug_ntlmssp_flags(uint32_t neg_flags)
|
||||
{
|
||||
DEBUG(3,("Got NTLMSSP neg_flags=0x%08x\n", neg_flags));
|
||||
|
||||
@ -222,7 +222,7 @@ NTSTATUS ntlmssp_update(NTLMSSP_STATE *ntlmssp_state,
|
||||
const DATA_BLOB in, DATA_BLOB *out)
|
||||
{
|
||||
DATA_BLOB input;
|
||||
uint32 ntlmssp_command;
|
||||
uint32_t ntlmssp_command;
|
||||
int i;
|
||||
|
||||
*out = data_blob(NULL, 0);
|
||||
@ -317,7 +317,7 @@ void ntlmssp_end(NTLMSSP_STATE **ntlmssp_state)
|
||||
*/
|
||||
|
||||
static const char *ntlmssp_target_name(struct ntlmssp_state *ntlmssp_state,
|
||||
uint32 neg_flags, uint32 *chal_flags)
|
||||
uint32_t neg_flags, uint32_t *chal_flags)
|
||||
{
|
||||
if (neg_flags & NTLMSSP_REQUEST_TARGET) {
|
||||
*chal_flags |= NTLMSSP_CHAL_TARGET_INFO;
|
||||
@ -335,7 +335,7 @@ static const char *ntlmssp_target_name(struct ntlmssp_state *ntlmssp_state,
|
||||
}
|
||||
|
||||
static void ntlmssp_handle_neg_flags(struct ntlmssp_state *ntlmssp_state,
|
||||
uint32 neg_flags, BOOL allow_lm) {
|
||||
uint32_t neg_flags, BOOL allow_lm) {
|
||||
if (neg_flags & NTLMSSP_NEGOTIATE_UNICODE) {
|
||||
ntlmssp_state->neg_flags |= NTLMSSP_NEGOTIATE_UNICODE;
|
||||
ntlmssp_state->neg_flags &= ~NTLMSSP_NEGOTIATE_OEM;
|
||||
@ -427,8 +427,8 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
|
||||
{
|
||||
DATA_BLOB struct_blob;
|
||||
fstring dnsname, dnsdomname;
|
||||
uint32 neg_flags = 0;
|
||||
uint32 ntlmssp_command, chal_flags;
|
||||
uint32_t neg_flags = 0;
|
||||
uint32_t ntlmssp_command, chal_flags;
|
||||
char *cliname=NULL, *domname=NULL;
|
||||
const uint8 *cryptkey;
|
||||
const char *target_name;
|
||||
@ -545,7 +545,7 @@ static NTSTATUS ntlmssp_server_negotiate(struct ntlmssp_state *ntlmssp_state,
|
||||
static NTSTATUS ntlmssp_server_preauth(struct ntlmssp_state *ntlmssp_state,
|
||||
const DATA_BLOB request)
|
||||
{
|
||||
uint32 ntlmssp_command, auth_flags;
|
||||
uint32_t ntlmssp_command, auth_flags;
|
||||
NTSTATUS nt_status;
|
||||
|
||||
uchar session_nonce_hash[16];
|
||||
@ -978,7 +978,7 @@ static NTSTATUS ntlmssp_client_challenge(struct ntlmssp_state *ntlmssp_state,
|
||||
TALLOC_CTX *out_mem_ctx,
|
||||
const DATA_BLOB in, DATA_BLOB *out)
|
||||
{
|
||||
uint32 chal_flags, ntlmssp_command, unkn1, unkn2;
|
||||
uint32_t chal_flags, ntlmssp_command, unkn1, unkn2;
|
||||
DATA_BLOB server_domain_blob;
|
||||
DATA_BLOB challenge_blob;
|
||||
DATA_BLOB struct_blob = data_blob(NULL, 0);
|
||||
|
@ -77,7 +77,7 @@ typedef struct ntlmssp_state
|
||||
unsigned int ref_count;
|
||||
enum NTLMSSP_ROLE role;
|
||||
enum server_types server_role;
|
||||
uint32 expected_state;
|
||||
uint32_t expected_state;
|
||||
|
||||
BOOL unicode;
|
||||
BOOL use_ntlmv2;
|
||||
@ -103,7 +103,7 @@ typedef struct ntlmssp_state
|
||||
DATA_BLOB nt_resp;
|
||||
DATA_BLOB session_key;
|
||||
|
||||
uint32 neg_flags; /* the current state of negotiation with the NTLMSSP partner */
|
||||
uint32_t neg_flags; /* the current state of negotiation with the NTLMSSP partner */
|
||||
|
||||
/* internal variables used by NTLM2 */
|
||||
BOOL doing_ntlm2;
|
||||
@ -163,7 +163,7 @@ typedef struct ntlmssp_state
|
||||
|
||||
/* SMB Signing */
|
||||
|
||||
uint32 ntlmssp_seq_num;
|
||||
uint32_t ntlmssp_seq_num;
|
||||
|
||||
/* ntlmv2 */
|
||||
char send_sign_key[16];
|
||||
|
@ -191,8 +191,8 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob,
|
||||
DATA_BLOB *b;
|
||||
size_t head_ofs = 0;
|
||||
uint16 len1, len2;
|
||||
uint32 ptr;
|
||||
uint32 *v;
|
||||
uint32_t ptr;
|
||||
uint32_t *v;
|
||||
pstring p;
|
||||
|
||||
va_start(ap, format);
|
||||
@ -296,7 +296,7 @@ BOOL msrpc_parse(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob,
|
||||
head_ofs += len1;
|
||||
break;
|
||||
case 'd':
|
||||
v = va_arg(ap, uint32 *);
|
||||
v = va_arg(ap, uint32_t *);
|
||||
NEED_DATA(4);
|
||||
*v = IVAL(blob->data, head_ofs); head_ofs += 4;
|
||||
break;
|
||||
|
@ -159,7 +159,7 @@ static NTSTATUS ntlmssp_make_packet_signature(NTLMSSP_STATE *ntlmssp_state,
|
||||
memcpy(sig->data + 12, seq_num, 4);
|
||||
|
||||
} else {
|
||||
uint32 crc;
|
||||
uint32_t crc;
|
||||
crc = crc32_calc_buffer((const char *)data, length);
|
||||
if (!msrpc_gen(sig_mem_ctx, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmssp_seq_num)) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
@ -302,7 +302,7 @@ NTSTATUS ntlmssp_seal_packet(NTLMSSP_STATE *ntlmssp_state,
|
||||
memcpy(sig->data + 4, digest, 8);
|
||||
memcpy(sig->data + 12, seq_num, 4);
|
||||
} else {
|
||||
uint32 crc;
|
||||
uint32_t crc;
|
||||
crc = crc32_calc_buffer((const char *)data, length);
|
||||
if (!msrpc_gen(sig_mem_ctx, sig, "dddd", NTLMSSP_SIGN_VERSION, 0, crc, ntlmssp_state->ntlmssp_seq_num)) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
|
@ -25,7 +25,7 @@
|
||||
struct schannel_state {
|
||||
TALLOC_CTX *mem_ctx;
|
||||
uint8 session_key[16];
|
||||
uint32 seq_num;
|
||||
uint32_t seq_num;
|
||||
BOOL initiator;
|
||||
DATA_BLOB signature;
|
||||
};
|
||||
|
@ -51,7 +51,7 @@ static NTSTATUS cli_link_internal(struct cli_tree *tree,
|
||||
/****************************************************************************
|
||||
Map standard UNIX permissions onto wire representations.
|
||||
****************************************************************************/
|
||||
static uint32 unix_perms_to_wire(mode_t perms)
|
||||
static uint32_t unix_perms_to_wire(mode_t perms)
|
||||
{
|
||||
unsigned int ret = 0;
|
||||
|
||||
@ -100,8 +100,8 @@ NTSTATUS cli_unix_hardlink(struct cli_tree *tree, const char *fname_src,
|
||||
****************************************************************************/
|
||||
static NTSTATUS cli_unix_chmod_chown_internal(struct cli_tree *tree,
|
||||
const char *fname,
|
||||
uint32 mode, uint32 uid,
|
||||
uint32 gid)
|
||||
uint32_t mode, uint32_t uid,
|
||||
uint32_t gid)
|
||||
{
|
||||
union smb_setfileinfo parms;
|
||||
NTSTATUS status;
|
||||
@ -136,7 +136,7 @@ NTSTATUS cli_unix_chown(struct cli_tree *tree, const char *fname, uid_t uid,
|
||||
gid_t gid)
|
||||
{
|
||||
return cli_unix_chmod_chown_internal(tree, fname, SMB_MODE_NO_CHANGE,
|
||||
(uint32)uid, (uint32)gid);
|
||||
(uint32_t)uid, (uint32_t)gid);
|
||||
}
|
||||
|
||||
|
||||
@ -224,9 +224,9 @@ NTSTATUS cli_nt_delete_on_close(struct cli_tree *tree, int fnum, BOOL flag)
|
||||
Used in CIFS-on-CIFS NTVFS.
|
||||
****************************************************************************/
|
||||
int cli_nt_create_full(struct cli_tree *tree, const char *fname,
|
||||
uint32 CreatFlags, uint32 DesiredAccess,
|
||||
uint32 FileAttributes, uint32 ShareAccess,
|
||||
uint32 CreateDisposition, uint32 CreateOptions,
|
||||
uint32_t CreatFlags, uint32_t DesiredAccess,
|
||||
uint32_t FileAttributes, uint32_t ShareAccess,
|
||||
uint32_t CreateDisposition, uint32_t CreateOptions,
|
||||
uint8 SecurityFlags)
|
||||
{
|
||||
union smb_open open_parms;
|
||||
@ -347,7 +347,7 @@ NTSTATUS cli_close(struct cli_tree *tree, int fnum)
|
||||
this is used for testing LOCKING_ANDX_CANCEL_LOCK
|
||||
****************************************************************************/
|
||||
NTSTATUS cli_locktype(struct cli_tree *tree, int fnum,
|
||||
uint32 offset, uint32 len, int timeout,
|
||||
uint32_t offset, uint32_t len, int timeout,
|
||||
unsigned char locktype)
|
||||
{
|
||||
union smb_lock parms;
|
||||
@ -375,7 +375,7 @@ NTSTATUS cli_locktype(struct cli_tree *tree, int fnum,
|
||||
Lock a file.
|
||||
****************************************************************************/
|
||||
NTSTATUS cli_lock(struct cli_tree *tree, int fnum,
|
||||
uint32 offset, uint32 len, int timeout,
|
||||
uint32_t offset, uint32_t len, int timeout,
|
||||
enum brl_type lock_type)
|
||||
{
|
||||
union smb_lock parms;
|
||||
@ -402,7 +402,7 @@ NTSTATUS cli_lock(struct cli_tree *tree, int fnum,
|
||||
/****************************************************************************
|
||||
Unlock a file.
|
||||
****************************************************************************/
|
||||
NTSTATUS cli_unlock(struct cli_tree *tree, int fnum, uint32 offset, uint32 len)
|
||||
NTSTATUS cli_unlock(struct cli_tree *tree, int fnum, uint32_t offset, uint32_t len)
|
||||
{
|
||||
union smb_lock parms;
|
||||
struct smb_lock_entry lock[1];
|
||||
|
@ -37,10 +37,10 @@
|
||||
/*
|
||||
* This function is not in the Heimdal mainline.
|
||||
*/
|
||||
krb5_error_code krb5_set_real_time(krb5_context context, int32_t seconds, int32_t microseconds)
|
||||
krb5_error_code krb5_set_real_time(krb5_context context, int32_t_t seconds, int32_t_t microseconds)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
int32_t sec, usec;
|
||||
int32_t_t sec, usec;
|
||||
|
||||
ret = krb5_us_timeofday(context, &sec, &usec);
|
||||
if (ret)
|
||||
|
@ -42,7 +42,7 @@ uint_t ea_list_size(uint_t num_eas, struct ea_struct *eas)
|
||||
void ea_put_list(char *data, uint_t num_eas, struct ea_struct *eas)
|
||||
{
|
||||
int i;
|
||||
uint32 ea_size;
|
||||
uint32_t ea_size;
|
||||
|
||||
ea_size = ea_list_size(num_eas, eas);
|
||||
|
||||
@ -105,7 +105,7 @@ NTSTATUS ea_pull_list(const DATA_BLOB *blob,
|
||||
uint_t *num_eas, struct ea_struct **eas)
|
||||
{
|
||||
int n;
|
||||
uint32 ea_size, ofs;
|
||||
uint32_t ea_size, ofs;
|
||||
|
||||
if (blob->length < 4) {
|
||||
return NT_STATUS_INFO_LENGTH_MISMATCH;
|
||||
|
@ -51,7 +51,7 @@ NTSTATUS smb_raw_changenotify_recv(struct cli_request *req,
|
||||
{
|
||||
struct smb_nttrans nt;
|
||||
NTSTATUS status;
|
||||
uint32 ofs, i;
|
||||
uint32_t ofs, i;
|
||||
struct cli_session *session = req?req->session:NULL;
|
||||
|
||||
status = smb_raw_nttrans_recv(req, mem_ctx, &nt);
|
||||
@ -64,7 +64,7 @@ NTSTATUS smb_raw_changenotify_recv(struct cli_request *req,
|
||||
|
||||
/* count them */
|
||||
for (ofs=0; nt.out.params.length - ofs > 12; ) {
|
||||
uint32 next = IVAL(nt.out.params.data, ofs);
|
||||
uint32_t next = IVAL(nt.out.params.data, ofs);
|
||||
parms->out.num_changes++;
|
||||
if (next == 0 ||
|
||||
ofs + next >= nt.out.params.length) break;
|
||||
|
@ -153,7 +153,7 @@ struct cli_request *cli_request_setup_session(struct cli_session *session,
|
||||
{
|
||||
struct cli_request *req;
|
||||
uint16 flags2;
|
||||
uint32 capabilities;
|
||||
uint32_t capabilities;
|
||||
|
||||
req = cli_request_setup_transport(session->transport, command, wct, buflen);
|
||||
|
||||
@ -798,7 +798,7 @@ DATA_BLOB cli_req_pull_blob(struct cli_request *req, TALLOC_CTX *mem_ctx, const
|
||||
|
||||
/* check that a lump of data in a request is within the bounds of the data section of
|
||||
the packet */
|
||||
static BOOL cli_req_data_oob(struct cli_request *req, const char *ptr, uint32 count)
|
||||
static BOOL cli_req_data_oob(struct cli_request *req, const char *ptr, uint32_t count)
|
||||
{
|
||||
/* be careful with wraparound! */
|
||||
if (ptr < req->in.data ||
|
||||
|
@ -320,8 +320,8 @@ NTSTATUS smb_raw_nttrans_recv(struct cli_request *req,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct smb_nttrans *parms)
|
||||
{
|
||||
uint32 total_data, recvd_data=0;
|
||||
uint32 total_param, recvd_param=0;
|
||||
uint32_t total_data, recvd_data=0;
|
||||
uint32_t total_param, recvd_param=0;
|
||||
|
||||
if (!cli_request_receive(req) ||
|
||||
cli_request_is_error(req)) {
|
||||
@ -369,9 +369,9 @@ NTSTATUS smb_raw_nttrans_recv(struct cli_request *req,
|
||||
|
||||
while (recvd_data < total_data ||
|
||||
recvd_param < total_param) {
|
||||
uint32 param_count, param_ofs, param_disp;
|
||||
uint32 data_count, data_ofs, data_disp;
|
||||
uint32 total_data2, total_param2;
|
||||
uint32_t param_count, param_ofs, param_disp;
|
||||
uint32_t data_count, data_ofs, data_disp;
|
||||
uint32_t total_data2, total_param2;
|
||||
|
||||
/* parse out the total lengths again - they can shrink! */
|
||||
total_param2 = IVAL(req->in.vwv, 3);
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
struct smb_basic_signing_context {
|
||||
DATA_BLOB mac_key;
|
||||
uint32 next_seq_num;
|
||||
uint32_t next_seq_num;
|
||||
};
|
||||
|
||||
/***********************************************************
|
||||
|
@ -75,7 +75,7 @@ NTSTATUS cli_nt_error(struct cli_tree *tree)
|
||||
|
||||
/* Return the DOS error from the last packet - an error class and an error
|
||||
code. */
|
||||
void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *ecode)
|
||||
void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32_t *ecode)
|
||||
{
|
||||
if (cli->transport->error.etype == ETYPE_DOS) {
|
||||
ntstatus_to_dos(cli->transport->error.e.nt_status,
|
||||
|
@ -59,7 +59,7 @@ struct dom_sid *dom_sid_parse_talloc(TALLOC_CTX *mem_ctx, const char *sidstr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ret->sub_auths = talloc_array_p(mem_ctx, uint32, num_sub_auths);
|
||||
ret->sub_auths = talloc_array_p(mem_ctx, uint32_t, num_sub_auths);
|
||||
if (!ret->sub_auths) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@
|
||||
/* NT status -> dos error map */
|
||||
static const struct {
|
||||
uint8 dos_class;
|
||||
uint32 dos_code;
|
||||
uint32_t dos_code;
|
||||
NTSTATUS ntstatus;
|
||||
} ntstatus_to_dos_map[] = {
|
||||
{ERRDOS, ERRgeneral, NT_STATUS_UNSUCCESSFUL},
|
||||
@ -613,7 +613,7 @@ static const struct {
|
||||
/* dos -> nt status error map */
|
||||
static const struct {
|
||||
uint8 dos_class;
|
||||
uint32 dos_code;
|
||||
uint32_t dos_code;
|
||||
NTSTATUS ntstatus;
|
||||
} dos_to_ntstatus_map[] = {
|
||||
{ERRDOS, ERRbadfunc, NT_STATUS_NOT_IMPLEMENTED},
|
||||
@ -1410,7 +1410,7 @@ static const struct {
|
||||
/*****************************************************************************
|
||||
convert a dos eclas/ecode to a NT status32 code
|
||||
*****************************************************************************/
|
||||
NTSTATUS dos_to_ntstatus(uint8 eclass, uint32 ecode)
|
||||
NTSTATUS dos_to_ntstatus(uint8 eclass, uint32_t ecode)
|
||||
{
|
||||
int i;
|
||||
if (eclass == 0 && ecode == 0) return NT_STATUS_OK;
|
||||
@ -1427,7 +1427,7 @@ NTSTATUS dos_to_ntstatus(uint8 eclass, uint32 ecode)
|
||||
/*****************************************************************************
|
||||
convert a NT status code to a dos class/code
|
||||
*****************************************************************************/
|
||||
void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32 *ecode)
|
||||
void ntstatus_to_dos(NTSTATUS ntstatus, uint8 *eclass, uint32_t *ecode)
|
||||
{
|
||||
int i;
|
||||
if (NT_STATUS_IS_OK(ntstatus)) {
|
||||
|
@ -461,7 +461,7 @@ BOOL encode_pw_buffer(char buffer[516], const char *password, int string_flags)
|
||||
returned password including termination.
|
||||
************************************************************/
|
||||
BOOL decode_pw_buffer(char in_buffer[516], char *new_pwrd,
|
||||
int new_pwrd_size, uint32 *new_pw_len,
|
||||
int new_pwrd_size, uint32_t *new_pw_len,
|
||||
int string_flags)
|
||||
{
|
||||
int byte_len=0;
|
||||
|
@ -16,7 +16,7 @@ interface mgmt
|
||||
} dcerpc_syntax_id_p;
|
||||
|
||||
typedef struct {
|
||||
unsigned32 count;
|
||||
uint32 count;
|
||||
[size_is(count)] dcerpc_syntax_id_p if_id[*];
|
||||
} rpc_if_id_vector_t;
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
/* offset lists are used to allow a push/pull function to find the
|
||||
start of an encapsulating structure */
|
||||
struct ndr_ofs_list {
|
||||
uint32 offset;
|
||||
uint32_t offset;
|
||||
struct ndr_ofs_list *next;
|
||||
};
|
||||
|
||||
@ -40,10 +40,10 @@ struct ndr_ofs_list {
|
||||
particular transport
|
||||
*/
|
||||
struct ndr_pull {
|
||||
uint32 flags; /* LIBNDR_FLAG_* */
|
||||
uint32_t flags; /* LIBNDR_FLAG_* */
|
||||
char *data;
|
||||
uint32 data_size;
|
||||
uint32 offset;
|
||||
uint32_t data_size;
|
||||
uint32_t offset;
|
||||
TALLOC_CTX *mem_ctx;
|
||||
|
||||
/* this points at a list of offsets to the structures being processed.
|
||||
@ -52,21 +52,21 @@ struct ndr_pull {
|
||||
};
|
||||
|
||||
struct ndr_pull_save {
|
||||
uint32 data_size;
|
||||
uint32 offset;
|
||||
uint32_t data_size;
|
||||
uint32_t offset;
|
||||
struct ndr_pull_save *next;
|
||||
};
|
||||
|
||||
/* structure passed to functions that generate NDR formatted data */
|
||||
struct ndr_push {
|
||||
uint32 flags; /* LIBNDR_FLAG_* */
|
||||
uint32_t flags; /* LIBNDR_FLAG_* */
|
||||
char *data;
|
||||
uint32 alloc_size;
|
||||
uint32 offset;
|
||||
uint32_t alloc_size;
|
||||
uint32_t offset;
|
||||
TALLOC_CTX *mem_ctx;
|
||||
|
||||
/* this is used to ensure we generate unique reference IDs */
|
||||
uint32 ptr_count;
|
||||
uint32_t ptr_count;
|
||||
|
||||
/* this points at a list of offsets to the structures being processed.
|
||||
The first element in the list is the current structure */
|
||||
@ -77,16 +77,16 @@ struct ndr_push {
|
||||
};
|
||||
|
||||
struct ndr_push_save {
|
||||
uint32 offset;
|
||||
uint32_t offset;
|
||||
struct ndr_push_save *next;
|
||||
};
|
||||
|
||||
|
||||
/* structure passed to functions that print IDL structures */
|
||||
struct ndr_print {
|
||||
uint32 flags; /* LIBNDR_FLAG_* */
|
||||
uint32_t flags; /* LIBNDR_FLAG_* */
|
||||
TALLOC_CTX *mem_ctx;
|
||||
uint32 depth;
|
||||
uint32_t depth;
|
||||
void (*print)(struct ndr_print *, const char *, ...);
|
||||
void *private;
|
||||
};
|
||||
@ -176,7 +176,7 @@ enum ndr_err_code {
|
||||
|
||||
#define NDR_PUSH_ALIGN(ndr, n) do { \
|
||||
if (!(ndr->flags & LIBNDR_FLAG_NOALIGN)) { \
|
||||
uint32 _pad = ((ndr->offset + (n-1)) & ~(n-1)) - ndr->offset; \
|
||||
uint32_t _pad = ((ndr->offset + (n-1)) & ~(n-1)) - ndr->offset; \
|
||||
while (_pad--) NDR_CHECK(ndr_push_uint8(ndr, 0)); \
|
||||
} \
|
||||
} while(0)
|
||||
@ -233,11 +233,11 @@ typedef NTSTATUS (*ndr_pull_fn_t)(struct ndr_pull *, void *);
|
||||
typedef NTSTATUS (*ndr_push_flags_fn_t)(struct ndr_push *, int ndr_flags, void *);
|
||||
typedef NTSTATUS (*ndr_push_const_fn_t)(struct ndr_push *, int ndr_flags, const void *);
|
||||
typedef NTSTATUS (*ndr_pull_flags_fn_t)(struct ndr_pull *, int ndr_flags, void *);
|
||||
typedef NTSTATUS (*ndr_push_union_fn_t)(struct ndr_push *, int ndr_flags, uint32, void *);
|
||||
typedef NTSTATUS (*ndr_pull_union_fn_t)(struct ndr_pull *, int ndr_flags, uint32, void *);
|
||||
typedef NTSTATUS (*ndr_push_union_fn_t)(struct ndr_push *, int ndr_flags, uint32_t, void *);
|
||||
typedef NTSTATUS (*ndr_pull_union_fn_t)(struct ndr_pull *, int ndr_flags, uint32_t, void *);
|
||||
typedef void (*ndr_print_fn_t)(struct ndr_print *, const char *, void *);
|
||||
typedef void (*ndr_print_function_t)(struct ndr_print *, const char *, int, void *);
|
||||
typedef void (*ndr_print_union_fn_t)(struct ndr_print *, const char *, uint32, void *);
|
||||
typedef void (*ndr_print_union_fn_t)(struct ndr_print *, const char *, uint32_t, void *);
|
||||
|
||||
#include "librpc/ndr/ndr_basic.h"
|
||||
#include "librpc/ndr/ndr_sec.h"
|
||||
|
@ -34,7 +34,7 @@
|
||||
/*
|
||||
work out the number of bytes needed to align on a n byte boundary
|
||||
*/
|
||||
size_t ndr_align_size(uint32 offset, size_t n)
|
||||
size_t ndr_align_size(uint32_t offset, size_t n)
|
||||
{
|
||||
if ((offset & (n-1)) == 0) return 0;
|
||||
return n - (offset & (n-1));
|
||||
@ -63,7 +63,7 @@ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
|
||||
create an ndr sub-context based on an existing context. The new context starts
|
||||
at the current offset, with the given size limit
|
||||
*/
|
||||
NTSTATUS ndr_pull_subcontext(struct ndr_pull *ndr, struct ndr_pull *ndr2, uint32 size)
|
||||
NTSTATUS ndr_pull_subcontext(struct ndr_pull *ndr, struct ndr_pull *ndr2, uint32_t size)
|
||||
{
|
||||
NDR_PULL_NEED_BYTES(ndr, size);
|
||||
*ndr2 = *ndr;
|
||||
@ -78,7 +78,7 @@ NTSTATUS ndr_pull_subcontext(struct ndr_pull *ndr, struct ndr_pull *ndr2, uint32
|
||||
/*
|
||||
advance by 'size' bytes
|
||||
*/
|
||||
NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32 size)
|
||||
NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32_t size)
|
||||
{
|
||||
ndr->offset += size;
|
||||
if (ndr->offset > ndr->data_size) {
|
||||
@ -92,7 +92,7 @@ NTSTATUS ndr_pull_advance(struct ndr_pull *ndr, uint32 size)
|
||||
/*
|
||||
set the parse offset to 'ofs'
|
||||
*/
|
||||
NTSTATUS ndr_pull_set_offset(struct ndr_pull *ndr, uint32 ofs)
|
||||
NTSTATUS ndr_pull_set_offset(struct ndr_pull *ndr, uint32_t ofs)
|
||||
{
|
||||
ndr->offset = ofs;
|
||||
if (ndr->offset > ndr->data_size) {
|
||||
@ -177,7 +177,7 @@ DATA_BLOB ndr_push_blob(struct ndr_push *ndr)
|
||||
/*
|
||||
expand the available space in the buffer to 'size'
|
||||
*/
|
||||
NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32 size)
|
||||
NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32_t size)
|
||||
{
|
||||
if (ndr->alloc_size >= size) {
|
||||
return NT_STATUS_OK;
|
||||
@ -199,7 +199,7 @@ NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32 size)
|
||||
/*
|
||||
set the push offset to 'ofs'
|
||||
*/
|
||||
NTSTATUS ndr_push_set_offset(struct ndr_push *ndr, uint32 ofs)
|
||||
NTSTATUS ndr_push_set_offset(struct ndr_push *ndr, uint32_t ofs)
|
||||
{
|
||||
NDR_CHECK(ndr_push_expand(ndr, ofs));
|
||||
ndr->offset = ofs;
|
||||
@ -210,7 +210,7 @@ NTSTATUS ndr_push_set_offset(struct ndr_push *ndr, uint32 ofs)
|
||||
push a generic array
|
||||
*/
|
||||
NTSTATUS ndr_push_array(struct ndr_push *ndr, int ndr_flags, void *base,
|
||||
size_t elsize, uint32 count,
|
||||
size_t elsize, uint32_t count,
|
||||
NTSTATUS (*push_fn)(struct ndr_push *, int, void *))
|
||||
{
|
||||
int i;
|
||||
@ -235,7 +235,7 @@ done:
|
||||
pull a constant sized array
|
||||
*/
|
||||
NTSTATUS ndr_pull_array(struct ndr_pull *ndr, int ndr_flags, void *base,
|
||||
size_t elsize, uint32 count,
|
||||
size_t elsize, uint32_t count,
|
||||
NTSTATUS (*pull_fn)(struct ndr_pull *, int, void *))
|
||||
{
|
||||
int i;
|
||||
@ -262,7 +262,7 @@ done:
|
||||
print a generic array
|
||||
*/
|
||||
void ndr_print_array(struct ndr_print *ndr, const char *name, void *base,
|
||||
size_t elsize, uint32 count,
|
||||
size_t elsize, uint32_t count,
|
||||
void (*print_fn)(struct ndr_print *, const char *, void *))
|
||||
{
|
||||
int i;
|
||||
@ -322,9 +322,9 @@ void ndr_print_debug(void (*fn)(struct ndr_print *, const char *, void *),
|
||||
/*
|
||||
a useful helper function for printing idl unions via DEBUG()
|
||||
*/
|
||||
void ndr_print_union_debug(void (*fn)(struct ndr_print *, const char *, uint32, void *),
|
||||
void ndr_print_union_debug(void (*fn)(struct ndr_print *, const char *, uint32_t, void *),
|
||||
const char *name,
|
||||
uint32 level,
|
||||
uint32_t level,
|
||||
void *ptr)
|
||||
{
|
||||
struct ndr_print ndr;
|
||||
@ -419,7 +419,7 @@ static NTSTATUS ndr_pull_subcontext_header(struct ndr_pull *ndr,
|
||||
{
|
||||
switch (sub_size) {
|
||||
case 0: {
|
||||
uint32 size = ndr->data_size - ndr->offset;
|
||||
uint32_t size = ndr->data_size - ndr->offset;
|
||||
if (size == 0) return NT_STATUS_OK;
|
||||
NDR_CHECK(ndr_pull_subcontext(ndr, ndr2, size));
|
||||
break;
|
||||
@ -434,7 +434,7 @@ static NTSTATUS ndr_pull_subcontext_header(struct ndr_pull *ndr,
|
||||
}
|
||||
|
||||
case 4: {
|
||||
uint32 size;
|
||||
uint32_t size;
|
||||
NDR_CHECK(ndr_pull_uint32(ndr, &size));
|
||||
if (size == 0) return NT_STATUS_OK;
|
||||
NDR_CHECK(ndr_pull_subcontext(ndr, ndr2, size));
|
||||
@ -488,9 +488,9 @@ NTSTATUS ndr_pull_subcontext_flags_fn(struct ndr_pull *ndr,
|
||||
|
||||
NTSTATUS ndr_pull_subcontext_union_fn(struct ndr_pull *ndr,
|
||||
size_t sub_size,
|
||||
uint32 level,
|
||||
uint32_t level,
|
||||
void *base,
|
||||
NTSTATUS (*fn)(struct ndr_pull *, int , uint32 , void *))
|
||||
NTSTATUS (*fn)(struct ndr_pull *, int , uint32_t , void *))
|
||||
{
|
||||
struct ndr_pull ndr2;
|
||||
|
||||
@ -577,9 +577,9 @@ NTSTATUS ndr_push_subcontext_flags_fn(struct ndr_push *ndr,
|
||||
*/
|
||||
NTSTATUS ndr_push_subcontext_union_fn(struct ndr_push *ndr,
|
||||
size_t sub_size,
|
||||
uint32 level,
|
||||
uint32_t level,
|
||||
void *base,
|
||||
NTSTATUS (*fn)(struct ndr_push *, int, uint32, void *))
|
||||
NTSTATUS (*fn)(struct ndr_push *, int, uint32_t, void *))
|
||||
{
|
||||
struct ndr_push *ndr2;
|
||||
|
||||
@ -644,7 +644,7 @@ NTSTATUS ndr_pull_relative(struct ndr_pull *ndr, const void **buf, size_t size,
|
||||
NTSTATUS (*fn)(struct ndr_pull *, int ndr_flags, void *))
|
||||
{
|
||||
struct ndr_pull ndr2;
|
||||
uint32 ofs;
|
||||
uint32_t ofs;
|
||||
struct ndr_pull_save save;
|
||||
void *p;
|
||||
|
||||
@ -719,8 +719,8 @@ NTSTATUS ndr_push_relative(struct ndr_push *ndr, int ndr_flags, const void *p,
|
||||
/*
|
||||
pull a union from a blob using NDR
|
||||
*/
|
||||
NTSTATUS ndr_pull_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, uint32 level, void *p,
|
||||
NTSTATUS (*fn)(struct ndr_pull *, int ndr_flags, uint32, void *))
|
||||
NTSTATUS ndr_pull_union_blob(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, uint32_t level, void *p,
|
||||
NTSTATUS (*fn)(struct ndr_pull *, int ndr_flags, uint32_t, void *))
|
||||
{
|
||||
struct ndr_pull *ndr;
|
||||
ndr = ndr_pull_init_blob(blob, mem_ctx);
|
||||
|
@ -54,9 +54,9 @@ NTSTATUS ndr_pull_uint16(struct ndr_pull *ndr, uint16 *v)
|
||||
|
||||
|
||||
/*
|
||||
parse a uint32
|
||||
parse a uint32_t
|
||||
*/
|
||||
NTSTATUS ndr_pull_uint32(struct ndr_pull *ndr, uint32 *v)
|
||||
NTSTATUS ndr_pull_uint32(struct ndr_pull *ndr, uint32_t *v)
|
||||
{
|
||||
NDR_PULL_ALIGN(ndr, 4);
|
||||
NDR_PULL_NEED_BYTES(ndr, 4);
|
||||
@ -100,7 +100,7 @@ NTSTATUS ndr_pull_HYPER_T(struct ndr_pull *ndr, HYPER_T *v)
|
||||
*/
|
||||
NTSTATUS ndr_pull_NTSTATUS(struct ndr_pull *ndr, NTSTATUS *status)
|
||||
{
|
||||
uint32 v;
|
||||
uint32_t v;
|
||||
NDR_CHECK(ndr_pull_uint32(ndr, &v));
|
||||
*status = NT_STATUS(v);
|
||||
return NT_STATUS_OK;
|
||||
@ -124,7 +124,7 @@ void ndr_print_NTSTATUS(struct ndr_print *ndr, const char *name, NTSTATUS *r)
|
||||
*/
|
||||
NTSTATUS ndr_pull_WERROR(struct ndr_pull *ndr, WERROR *status)
|
||||
{
|
||||
uint32 v;
|
||||
uint32_t v;
|
||||
NDR_CHECK(ndr_pull_uint32(ndr, &v));
|
||||
*status = W_ERROR(v);
|
||||
return NT_STATUS_OK;
|
||||
@ -146,7 +146,7 @@ void ndr_print_WERROR(struct ndr_print *ndr, const char *name, WERROR *r)
|
||||
/*
|
||||
parse a set of bytes
|
||||
*/
|
||||
NTSTATUS ndr_pull_bytes(struct ndr_pull *ndr, char *data, uint32 n)
|
||||
NTSTATUS ndr_pull_bytes(struct ndr_pull *ndr, char *data, uint32_t n)
|
||||
{
|
||||
NDR_PULL_NEED_BYTES(ndr, n);
|
||||
memcpy(data, ndr->data + ndr->offset, n);
|
||||
@ -157,7 +157,7 @@ NTSTATUS ndr_pull_bytes(struct ndr_pull *ndr, char *data, uint32 n)
|
||||
/*
|
||||
pull an array of uint8
|
||||
*/
|
||||
NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, char *data, uint32 n)
|
||||
NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, char *data, uint32_t n)
|
||||
{
|
||||
if (!(ndr_flags & NDR_SCALARS)) {
|
||||
return NT_STATUS_OK;
|
||||
@ -169,9 +169,9 @@ NTSTATUS ndr_pull_array_uint8(struct ndr_pull *ndr, int ndr_flags, char *data, u
|
||||
/*
|
||||
pull an array of uint16
|
||||
*/
|
||||
NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, int ndr_flags, uint16 *data, uint32 n)
|
||||
NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, int ndr_flags, uint16 *data, uint32_t n)
|
||||
{
|
||||
uint32 i;
|
||||
uint32_t i;
|
||||
if (!(ndr_flags & NDR_SCALARS)) {
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
@ -182,11 +182,11 @@ NTSTATUS ndr_pull_array_uint16(struct ndr_pull *ndr, int ndr_flags, uint16 *data
|
||||
}
|
||||
|
||||
/*
|
||||
pull a const array of uint32
|
||||
pull a const array of uint32_t
|
||||
*/
|
||||
NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, int ndr_flags, uint32 *data, uint32 n)
|
||||
NTSTATUS ndr_pull_array_uint32(struct ndr_pull *ndr, int ndr_flags, uint32_t *data, uint32_t n)
|
||||
{
|
||||
uint32 i;
|
||||
uint32_t i;
|
||||
if (!(ndr_flags & NDR_SCALARS)) {
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
@ -220,9 +220,9 @@ NTSTATUS ndr_push_uint16(struct ndr_push *ndr, uint16 v)
|
||||
}
|
||||
|
||||
/*
|
||||
push a uint32
|
||||
push a uint32_t
|
||||
*/
|
||||
NTSTATUS ndr_push_uint32(struct ndr_push *ndr, uint32 v)
|
||||
NTSTATUS ndr_push_uint32(struct ndr_push *ndr, uint32_t v)
|
||||
{
|
||||
NDR_PUSH_ALIGN(ndr, 4);
|
||||
NDR_PUSH_NEED_BYTES(ndr, 4);
|
||||
@ -276,7 +276,7 @@ NTSTATUS ndr_pull_align(struct ndr_pull *ndr, size_t size)
|
||||
/*
|
||||
push some bytes
|
||||
*/
|
||||
NTSTATUS ndr_push_bytes(struct ndr_push *ndr, const char *data, uint32 n)
|
||||
NTSTATUS ndr_push_bytes(struct ndr_push *ndr, const char *data, uint32_t n)
|
||||
{
|
||||
NDR_PUSH_NEED_BYTES(ndr, n);
|
||||
memcpy(ndr->data + ndr->offset, data, n);
|
||||
@ -287,7 +287,7 @@ NTSTATUS ndr_push_bytes(struct ndr_push *ndr, const char *data, uint32 n)
|
||||
/*
|
||||
push some zero bytes
|
||||
*/
|
||||
NTSTATUS ndr_push_zero(struct ndr_push *ndr, uint32 n)
|
||||
NTSTATUS ndr_push_zero(struct ndr_push *ndr, uint32_t n)
|
||||
{
|
||||
NDR_PUSH_NEED_BYTES(ndr, n);
|
||||
memset(ndr->data + ndr->offset, 0, n);
|
||||
@ -298,7 +298,7 @@ NTSTATUS ndr_push_zero(struct ndr_push *ndr, uint32 n)
|
||||
/*
|
||||
push an array of uint8
|
||||
*/
|
||||
NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const char *data, uint32 n)
|
||||
NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const char *data, uint32_t n)
|
||||
{
|
||||
if (!(ndr_flags & NDR_SCALARS)) {
|
||||
return NT_STATUS_OK;
|
||||
@ -309,7 +309,7 @@ NTSTATUS ndr_push_array_uint8(struct ndr_push *ndr, int ndr_flags, const char *d
|
||||
/*
|
||||
push an array of uint16
|
||||
*/
|
||||
NTSTATUS ndr_push_array_uint16(struct ndr_push *ndr, int ndr_flags, const uint16 *data, uint32 n)
|
||||
NTSTATUS ndr_push_array_uint16(struct ndr_push *ndr, int ndr_flags, const uint16 *data, uint32_t n)
|
||||
{
|
||||
int i;
|
||||
if (!(ndr_flags & NDR_SCALARS)) {
|
||||
@ -322,9 +322,9 @@ NTSTATUS ndr_push_array_uint16(struct ndr_push *ndr, int ndr_flags, const uint16
|
||||
}
|
||||
|
||||
/*
|
||||
push an array of uint32
|
||||
push an array of uint32_t
|
||||
*/
|
||||
NTSTATUS ndr_push_array_uint32(struct ndr_push *ndr, int ndr_flags, const uint32 *data, uint32 n)
|
||||
NTSTATUS ndr_push_array_uint32(struct ndr_push *ndr, int ndr_flags, const uint32_t *data, uint32_t n)
|
||||
{
|
||||
int i;
|
||||
if (!(ndr_flags & NDR_SCALARS)) {
|
||||
@ -357,7 +357,7 @@ void ndr_push_restore(struct ndr_push *ndr, struct ndr_push_save *save)
|
||||
*/
|
||||
NTSTATUS ndr_push_ptr(struct ndr_push *ndr, const void *p)
|
||||
{
|
||||
uint32 ptr = 0;
|
||||
uint32_t ptr = 0;
|
||||
if (p) {
|
||||
/* we do this to ensure that we generate unique ref ids,
|
||||
which means we can handle the case where a MS programmer
|
||||
@ -375,7 +375,7 @@ NTSTATUS ndr_push_ptr(struct ndr_push *ndr, const void *p)
|
||||
NTSTATUS ndr_pull_string(struct ndr_pull *ndr, int ndr_flags, const char **s)
|
||||
{
|
||||
char *as=NULL;
|
||||
uint32 len1, ofs, len2;
|
||||
uint32_t len1, ofs, len2;
|
||||
uint16 len3;
|
||||
int ret;
|
||||
int chset = CH_UCS2;
|
||||
@ -666,7 +666,7 @@ NTSTATUS ndr_push_time_t(struct ndr_push *ndr, time_t t)
|
||||
*/
|
||||
NTSTATUS ndr_pull_time_t(struct ndr_pull *ndr, time_t *t)
|
||||
{
|
||||
uint32 tt;
|
||||
uint32_t tt;
|
||||
NDR_CHECK(ndr_pull_uint32(ndr, &tt));
|
||||
*t = tt;
|
||||
return NT_STATUS_OK;
|
||||
@ -688,27 +688,27 @@ void ndr_print_uint16(struct ndr_print *ndr, const char *name, uint16 v)
|
||||
ndr->print(ndr, "%-25s: 0x%04x (%u)", name, v, v);
|
||||
}
|
||||
|
||||
void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32 v)
|
||||
void ndr_print_uint32(struct ndr_print *ndr, const char *name, uint32_t v)
|
||||
{
|
||||
ndr->print(ndr, "%-25s: 0x%08x (%u)", name, v, v);
|
||||
}
|
||||
|
||||
void ndr_print_uint64(struct ndr_print *ndr, const char *name, uint64 v)
|
||||
{
|
||||
ndr->print(ndr, "%-25s: 0x%08x%08x", name, (uint32)(v >> 32), (uint32)(v & 0xFFFFFFFF));
|
||||
ndr->print(ndr, "%-25s: 0x%08x%08x", name, (uint32_t)(v >> 32), (uint32_t)(v & 0xFFFFFFFF));
|
||||
}
|
||||
|
||||
void ndr_print_int64(struct ndr_print *ndr, const char *name, int64 v)
|
||||
{
|
||||
ndr->print(ndr, "%-25s: 0x%08x%08x (%lld)", name,
|
||||
(uint32)(v >> 32),
|
||||
(uint32)(v & 0xFFFFFFFF),
|
||||
(uint32_t)(v >> 32),
|
||||
(uint32_t)(v & 0xFFFFFFFF),
|
||||
v);
|
||||
}
|
||||
|
||||
void ndr_print_HYPER_T(struct ndr_print *ndr, const char *name, HYPER_T v)
|
||||
{
|
||||
ndr->print(ndr, "%-25s: 0x%08x%08x", name, (uint32)(v >> 32), (uint32)(v & 0xFFFFFFFF));
|
||||
ndr->print(ndr, "%-25s: 0x%08x%08x", name, (uint32_t)(v >> 32), (uint32_t)(v & 0xFFFFFFFF));
|
||||
}
|
||||
|
||||
void ndr_print_ptr(struct ndr_print *ndr, const char *name, const void *p)
|
||||
@ -754,7 +754,7 @@ void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16 level)
|
||||
}
|
||||
|
||||
void ndr_print_array_uint32(struct ndr_print *ndr, const char *name,
|
||||
const uint32 *data, uint32 count)
|
||||
const uint32_t *data, uint32_t count)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -772,7 +772,7 @@ void ndr_print_array_uint32(struct ndr_print *ndr, const char *name,
|
||||
}
|
||||
|
||||
void ndr_print_array_uint16(struct ndr_print *ndr, const char *name,
|
||||
const uint16 *data, uint32 count)
|
||||
const uint16 *data, uint32_t count)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -790,7 +790,7 @@ void ndr_print_array_uint16(struct ndr_print *ndr, const char *name,
|
||||
}
|
||||
|
||||
void ndr_print_array_uint8(struct ndr_print *ndr, const char *name,
|
||||
const uint8 *data, uint32 count)
|
||||
const uint8 *data, uint32_t count)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -822,10 +822,10 @@ void ndr_print_array_uint8(struct ndr_print *ndr, const char *name,
|
||||
*/
|
||||
NTSTATUS GUID_from_string(const char *s, struct GUID *guid)
|
||||
{
|
||||
uint32 time_low;
|
||||
uint32 time_mid, time_hi_and_version;
|
||||
uint32 clock_seq[2];
|
||||
uint32 node[6];
|
||||
uint32_t time_low;
|
||||
uint32_t time_mid, time_hi_and_version;
|
||||
uint32_t clock_seq[2];
|
||||
uint32_t node[6];
|
||||
int i;
|
||||
|
||||
if (11 != sscanf(s, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
@ -904,7 +904,7 @@ NTSTATUS ndr_push_DATA_BLOB(struct ndr_push *ndr, DATA_BLOB blob)
|
||||
*/
|
||||
NTSTATUS ndr_pull_DATA_BLOB(struct ndr_pull *ndr, DATA_BLOB *blob)
|
||||
{
|
||||
uint32 length;
|
||||
uint32_t length;
|
||||
|
||||
if (ndr->flags & LIBNDR_ALIGN_FLAGS) {
|
||||
if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
|
||||
|
@ -29,7 +29,7 @@
|
||||
*/
|
||||
NTSTATUS ndr_pull_dom_sid2(struct ndr_pull *ndr, int ndr_flags, struct dom_sid *sid)
|
||||
{
|
||||
uint32 num_auths;
|
||||
uint32_t num_auths;
|
||||
if (!(ndr_flags & NDR_SCALARS)) {
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
@ -56,7 +56,7 @@ NTSTATUS ndr_push_dom_sid2(struct ndr_push *ndr, int ndr_flags, struct dom_sid *
|
||||
char *dom_sid_string(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
|
||||
{
|
||||
int i, ofs, maxlen;
|
||||
uint32 ia;
|
||||
uint32_t ia;
|
||||
char *ret;
|
||||
|
||||
if (!sid) {
|
||||
@ -110,7 +110,7 @@ size_t ndr_size_dom_sid(struct dom_sid *sid)
|
||||
*/
|
||||
struct dom_sid *dom_sid_add_rid(TALLOC_CTX *mem_ctx,
|
||||
const struct dom_sid *domain_sid,
|
||||
uint32 rid)
|
||||
uint32_t rid)
|
||||
{
|
||||
struct dom_sid *sid;
|
||||
|
||||
@ -118,11 +118,11 @@ struct dom_sid *dom_sid_add_rid(TALLOC_CTX *mem_ctx,
|
||||
if (!sid) return NULL;
|
||||
|
||||
*sid = *domain_sid;
|
||||
sid->sub_auths = talloc_array_p(mem_ctx, uint32, sid->num_auths+1);
|
||||
sid->sub_auths = talloc_array_p(mem_ctx, uint32_t, sid->num_auths+1);
|
||||
if (!sid->sub_auths) {
|
||||
return NULL;
|
||||
}
|
||||
memcpy(sid->sub_auths, domain_sid->sub_auths, sid->num_auths*sizeof(uint32));
|
||||
memcpy(sid->sub_auths, domain_sid->sub_auths, sid->num_auths*sizeof(uint32_t));
|
||||
sid->sub_auths[sid->num_auths] = rid;
|
||||
sid->num_auths++;
|
||||
return sid;
|
||||
|
@ -39,7 +39,7 @@
|
||||
struct smb_query_secdesc {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint32 secinfo_flags;
|
||||
uint32_t secinfo_flags;
|
||||
} in;
|
||||
struct {
|
||||
struct security_descriptor *sd;
|
||||
@ -50,7 +50,7 @@ struct smb_query_secdesc {
|
||||
struct smb_set_secdesc {
|
||||
struct {
|
||||
uint16 fnum;
|
||||
uint32 secinfo_flags;
|
||||
uint32_t secinfo_flags;
|
||||
struct security_descriptor *sd;
|
||||
} in;
|
||||
};
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "includes.h"
|
||||
|
||||
NTSTATUS pull_spoolss_PrinterInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
|
||||
uint32 level, uint32 count,
|
||||
uint32_t level, uint32_t count,
|
||||
union spoolss_PrinterInfo **info)
|
||||
{
|
||||
int i;
|
||||
@ -42,7 +42,7 @@ NTSTATUS pull_spoolss_PrinterInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
NTSTATUS pull_spoolss_FormInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
|
||||
uint32 level, uint32 count,
|
||||
uint32_t level, uint32_t count,
|
||||
union spoolss_FormInfo **info)
|
||||
{
|
||||
int i;
|
||||
@ -59,7 +59,7 @@ NTSTATUS pull_spoolss_FormInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
NTSTATUS pull_spoolss_JobInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
|
||||
uint32 level, uint32 count,
|
||||
uint32_t level, uint32_t count,
|
||||
union spoolss_JobInfo **info)
|
||||
{
|
||||
int i;
|
||||
@ -76,7 +76,7 @@ NTSTATUS pull_spoolss_JobInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
NTSTATUS pull_spoolss_DriverInfoArray(DATA_BLOB *blob, TALLOC_CTX *mem_ctx,
|
||||
uint32 level, uint32 count,
|
||||
uint32_t level, uint32_t count,
|
||||
union spoolss_DriverInfo **info)
|
||||
{
|
||||
int i;
|
||||
|
@ -469,7 +469,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p,
|
||||
struct dcerpc_packet pkt;
|
||||
NTSTATUS status;
|
||||
DATA_BLOB blob, payload;
|
||||
uint32 remaining, chunk_size;
|
||||
uint32_t remaining, chunk_size;
|
||||
|
||||
/* allow the application to tell when a fault has happened */
|
||||
p->last_fault_code = 0;
|
||||
@ -560,7 +560,7 @@ NTSTATUS dcerpc_request(struct dcerpc_pipe *p,
|
||||
|
||||
/* continue receiving fragments */
|
||||
while (!(pkt.pfc_flags & DCERPC_PFC_FLAG_LAST)) {
|
||||
uint32 length;
|
||||
uint32_t length;
|
||||
|
||||
status = p->transport.secondary_request(p, mem_ctx, &blob);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
@ -764,7 +764,7 @@ static NTSTATUS dcerpc_ndr_validate_out(TALLOC_CTX *mem_ctx,
|
||||
standard format
|
||||
*/
|
||||
NTSTATUS dcerpc_ndr_request(struct dcerpc_pipe *p,
|
||||
uint32 opnum,
|
||||
uint32_t opnum,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
NTSTATUS (*ndr_push)(struct ndr_push *, int, void *),
|
||||
NTSTATUS (*ndr_pull)(struct ndr_pull *, int, void *),
|
||||
|
@ -47,9 +47,9 @@ struct dcerpc_security {
|
||||
struct dcerpc_pipe {
|
||||
TALLOC_CTX *mem_ctx;
|
||||
int reference_count;
|
||||
uint32 call_id;
|
||||
uint32 srv_max_xmit_frag;
|
||||
uint32 srv_max_recv_frag;
|
||||
uint32_t call_id;
|
||||
uint32_t srv_max_xmit_frag;
|
||||
uint32_t srv_max_recv_frag;
|
||||
unsigned flags;
|
||||
struct dcerpc_security *security_state;
|
||||
struct dcerpc_auth *auth_info;
|
||||
@ -67,7 +67,7 @@ struct dcerpc_pipe {
|
||||
} transport;
|
||||
|
||||
/* the last fault code from a DCERPC fault */
|
||||
uint32 last_fault_code;
|
||||
uint32_t last_fault_code;
|
||||
};
|
||||
|
||||
/* dcerpc pipe flags */
|
||||
@ -99,15 +99,15 @@ struct dcerpc_interface_call {
|
||||
};
|
||||
|
||||
struct dcerpc_endpoint_list {
|
||||
uint32 count;
|
||||
uint32_t count;
|
||||
const char * const *names;
|
||||
};
|
||||
|
||||
struct dcerpc_interface_table {
|
||||
const char *name;
|
||||
const char *uuid;
|
||||
uint32 if_version;
|
||||
uint32 num_calls;
|
||||
uint32_t if_version;
|
||||
uint32_t num_calls;
|
||||
const struct dcerpc_interface_call *calls;
|
||||
const struct dcerpc_endpoint_list *endpoints;
|
||||
};
|
||||
@ -118,5 +118,5 @@ struct dcerpc_binding {
|
||||
enum dcerpc_transport_t transport;
|
||||
const char *host;
|
||||
const char **options;
|
||||
uint32 flags;
|
||||
uint32_t flags;
|
||||
};
|
||||
|
@ -90,7 +90,7 @@ NTSTATUS dcerpc_schannel_key(struct dcerpc_pipe *p,
|
||||
uint8 mach_pwd[16];
|
||||
struct creds_CredentialState creds;
|
||||
const char *workgroup, *workstation;
|
||||
uint32 negotiate_flags = 0;
|
||||
uint32_t negotiate_flags = 0;
|
||||
|
||||
workstation = username;
|
||||
workgroup = domain;
|
||||
|
@ -105,7 +105,7 @@ static NTSTATUS dcerpc_raw_recv(struct dcerpc_pipe *p,
|
||||
|
||||
/* the rest of the data is available via SMBreadX */
|
||||
while (frag_length > payload.length) {
|
||||
uint32 n;
|
||||
uint32_t n;
|
||||
union smb_read io;
|
||||
|
||||
n = frag_length - payload.length;
|
||||
@ -169,8 +169,8 @@ static NTSTATUS smb_secondary_request(struct dcerpc_pipe *p,
|
||||
{
|
||||
struct smb_private *smb = p->transport.private;
|
||||
union smb_read io;
|
||||
uint32 n = 0x2000;
|
||||
uint32 frag_length;
|
||||
uint32_t n = 0x2000;
|
||||
uint32_t frag_length;
|
||||
NTSTATUS status;
|
||||
|
||||
*blob = data_blob_talloc(mem_ctx, NULL, n);
|
||||
|
@ -26,7 +26,7 @@
|
||||
struct tcp_private {
|
||||
int fd;
|
||||
char *server_name;
|
||||
uint32 port;
|
||||
uint32_t port;
|
||||
};
|
||||
|
||||
|
||||
@ -47,7 +47,7 @@ static NTSTATUS tcp_raw_recv(struct dcerpc_pipe *p,
|
||||
{
|
||||
struct tcp_private *tcp = p->transport.private;
|
||||
ssize_t ret;
|
||||
uint32 frag_length;
|
||||
uint32_t frag_length;
|
||||
DATA_BLOB blob1;
|
||||
|
||||
blob1 = data_blob_talloc(mem_ctx, NULL, 16);
|
||||
@ -171,7 +171,7 @@ static const char *tcp_peer_name(struct dcerpc_pipe *p)
|
||||
*/
|
||||
NTSTATUS dcerpc_pipe_open_tcp(struct dcerpc_pipe **p,
|
||||
const char *server,
|
||||
uint32 port)
|
||||
uint32_t port)
|
||||
{
|
||||
struct tcp_private *tcp;
|
||||
int fd;
|
||||
|
@ -53,7 +53,7 @@ size_t ndr_size_epm_towers(struct epm_towers *towers)
|
||||
*/
|
||||
NTSTATUS dcerpc_epm_map_tcp_port(const char *server,
|
||||
const char *uuid, unsigned version,
|
||||
uint32 *port)
|
||||
uint32_t *port)
|
||||
{
|
||||
struct dcerpc_pipe *p;
|
||||
NTSTATUS status;
|
||||
@ -160,7 +160,7 @@ NTSTATUS dcerpc_epm_map_tcp_port(const char *server,
|
||||
/*
|
||||
find the pipe name for a local IDL interface
|
||||
*/
|
||||
const char *idl_pipe_name(const char *uuid, uint32 if_version)
|
||||
const char *idl_pipe_name(const char *uuid, uint32_t if_version)
|
||||
{
|
||||
int i;
|
||||
for (i=0;dcerpc_pipes[i];i++) {
|
||||
@ -175,7 +175,7 @@ const char *idl_pipe_name(const char *uuid, uint32 if_version)
|
||||
/*
|
||||
find the number of calls defined by local IDL
|
||||
*/
|
||||
int idl_num_calls(const char *uuid, uint32 if_version)
|
||||
int idl_num_calls(const char *uuid, uint32_t if_version)
|
||||
{
|
||||
int i;
|
||||
for (i=0;dcerpc_pipes[i];i++) {
|
||||
@ -271,7 +271,7 @@ static const struct {
|
||||
|
||||
static const struct {
|
||||
const char *name;
|
||||
uint32 flag;
|
||||
uint32_t flag;
|
||||
} ncacn_options[] = {
|
||||
{"sign", DCERPC_SIGN},
|
||||
{"seal", DCERPC_SEAL},
|
||||
@ -429,7 +429,7 @@ NTSTATUS dcerpc_parse_binding(TALLOC_CTX *mem_ctx, const char *s, struct dcerpc_
|
||||
static NTSTATUS dcerpc_pipe_connect_ncacn_np(struct dcerpc_pipe **p,
|
||||
struct dcerpc_binding *binding,
|
||||
const char *pipe_uuid,
|
||||
uint32 pipe_version,
|
||||
uint32_t pipe_version,
|
||||
const char *domain,
|
||||
const char *username,
|
||||
const char *password)
|
||||
@ -514,13 +514,13 @@ done:
|
||||
static NTSTATUS dcerpc_pipe_connect_ncacn_ip_tcp(struct dcerpc_pipe **p,
|
||||
struct dcerpc_binding *binding,
|
||||
const char *pipe_uuid,
|
||||
uint32 pipe_version,
|
||||
uint32_t pipe_version,
|
||||
const char *domain,
|
||||
const char *username,
|
||||
const char *password)
|
||||
{
|
||||
NTSTATUS status;
|
||||
uint32 port = 0;
|
||||
uint32_t port = 0;
|
||||
|
||||
if (binding->options && binding->options[0]) {
|
||||
port = atoi(binding->options[0]);
|
||||
@ -574,7 +574,7 @@ static NTSTATUS dcerpc_pipe_connect_ncacn_ip_tcp(struct dcerpc_pipe **p,
|
||||
NTSTATUS dcerpc_pipe_connect_b(struct dcerpc_pipe **p,
|
||||
struct dcerpc_binding *binding,
|
||||
const char *pipe_uuid,
|
||||
uint32 pipe_version,
|
||||
uint32_t pipe_version,
|
||||
const char *domain,
|
||||
const char *username,
|
||||
const char *password)
|
||||
@ -606,7 +606,7 @@ NTSTATUS dcerpc_pipe_connect_b(struct dcerpc_pipe **p,
|
||||
NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **p,
|
||||
const char *binding,
|
||||
const char *pipe_uuid,
|
||||
uint32 pipe_version,
|
||||
uint32_t pipe_version,
|
||||
const char *domain,
|
||||
const char *username,
|
||||
const char *password)
|
||||
@ -642,7 +642,7 @@ NTSTATUS dcerpc_pipe_connect(struct dcerpc_pipe **p,
|
||||
NTSTATUS dcerpc_secondary_smb(struct dcerpc_pipe *p, struct dcerpc_pipe **p2,
|
||||
const char *pipe_name,
|
||||
const char *pipe_uuid,
|
||||
uint32 pipe_version)
|
||||
uint32_t pipe_version)
|
||||
{
|
||||
NTSTATUS status;
|
||||
struct cli_tree *tree;
|
||||
|
@ -54,7 +54,7 @@ struct ipc_private {
|
||||
static uint16 find_next_fnum(struct ipc_private *ipc)
|
||||
{
|
||||
struct pipe_state *p;
|
||||
uint32 ret;
|
||||
uint32_t ret;
|
||||
|
||||
if (ipc->num_open == 0xFFFF) {
|
||||
return 0;
|
||||
|
@ -133,7 +133,7 @@ struct svfs_dir *svfs_list(TALLOC_CTX *mem_ctx, struct request_context *req, con
|
||||
/*
|
||||
convert a unix stat struct to a dos attrib
|
||||
*/
|
||||
uint32 svfs_file_attrib(struct stat *st)
|
||||
uint32_t svfs_file_attrib(struct stat *st)
|
||||
{
|
||||
if (S_ISDIR(st->st_mode)) {
|
||||
return FILE_ATTRIBUTE_DIRECTORY;
|
||||
|
@ -2193,7 +2193,7 @@ static BOOL handle_copy(const char *pszParmValue, char **ptr)
|
||||
|
||||
static uid_t winbind_uid_low, winbind_uid_high;
|
||||
static gid_t winbind_gid_low, winbind_gid_high;
|
||||
static uint32 non_unix_account_low, non_unix_account_high;
|
||||
static uint32_t non_unix_account_low, non_unix_account_high;
|
||||
|
||||
BOOL lp_winbind_uid(uid_t *low, uid_t *high)
|
||||
{
|
||||
@ -2223,7 +2223,7 @@ BOOL lp_winbind_gid(gid_t *low, gid_t *high)
|
||||
return True;
|
||||
}
|
||||
|
||||
BOOL lp_non_unix_account_range(uint32 *low, uint32 *high)
|
||||
BOOL lp_non_unix_account_range(uint32_t *low, uint32_t *high)
|
||||
{
|
||||
if (non_unix_account_low == 0 || non_unix_account_high == 0)
|
||||
return False;
|
||||
@ -2241,7 +2241,7 @@ BOOL lp_non_unix_account_range(uint32 *low, uint32 *high)
|
||||
|
||||
static BOOL handle_winbind_uid(const char *pszParmValue, char **ptr)
|
||||
{
|
||||
uint32 low, high;
|
||||
uint32_t low, high;
|
||||
|
||||
if (sscanf(pszParmValue, "%u-%u", &low, &high) != 2 || high < low)
|
||||
return False;
|
||||
@ -2258,7 +2258,7 @@ static BOOL handle_winbind_uid(const char *pszParmValue, char **ptr)
|
||||
|
||||
static BOOL handle_winbind_gid(const char *pszParmValue, char **ptr)
|
||||
{
|
||||
uint32 low, high;
|
||||
uint32_t low, high;
|
||||
|
||||
if (sscanf(pszParmValue, "%u-%u", &low, &high) != 2 || high < low)
|
||||
return False;
|
||||
@ -2279,7 +2279,7 @@ static BOOL handle_winbind_gid(const char *pszParmValue, char **ptr)
|
||||
|
||||
static BOOL handle_non_unix_account_range(const char *pszParmValue, char **ptr)
|
||||
{
|
||||
uint32 low, high;
|
||||
uint32_t low, high;
|
||||
|
||||
if (sscanf(pszParmValue, "%u-%u", &low, &high) != 2 || high < low)
|
||||
return False;
|
||||
|
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
/* This hardcoded value should go into a ldb database! */
|
||||
uint32 dcesrv_common_get_platform_id(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
|
||||
uint32_t dcesrv_common_get_platform_id(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
|
||||
{
|
||||
return 500;
|
||||
}
|
||||
@ -43,13 +43,13 @@ const char *dcesrv_common_get_domain_name(TALLOC_CTX *mem_ctx, struct dcesrv_con
|
||||
}
|
||||
|
||||
/* This hardcoded value should go into a ldb database! */
|
||||
uint32 dcesrv_common_get_version_major(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
|
||||
uint32_t dcesrv_common_get_version_major(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
/* This hardcoded value should go into a ldb database! */
|
||||
uint32 dcesrv_common_get_version_minor(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
|
||||
uint32_t dcesrv_common_get_version_minor(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
@ -27,9 +27,9 @@
|
||||
*/
|
||||
|
||||
/* This hardcoded value should go into a ldb database! */
|
||||
uint32 dcesrv_common_get_count_of_shares(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
|
||||
uint32_t dcesrv_common_get_count_of_shares(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx)
|
||||
{
|
||||
/* what's about int -> uint32 overflow */
|
||||
/* what's about int -> uint32_t overflow */
|
||||
return lp_numservices();
|
||||
}
|
||||
|
||||
@ -44,25 +44,25 @@ const char *dcesrv_common_get_share_comment(TALLOC_CTX *mem_ctx, struct dcesrv_c
|
||||
}
|
||||
|
||||
/* This hardcoded value should go into a ldb database! */
|
||||
uint32 dcesrv_common_get_share_permissions(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
uint32_t dcesrv_common_get_share_permissions(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This hardcoded value should go into a ldb database! */
|
||||
uint32 dcesrv_common_get_share_max_users(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
uint32_t dcesrv_common_get_share_max_users(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
/* This hardcoded value should go into a ldb database! */
|
||||
uint32 dcesrv_common_get_share_current_users(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
uint32_t dcesrv_common_get_share_current_users(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* This hardcoded value should go into a ldb database! */
|
||||
uint32 dcesrv_common_get_share_type(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
uint32_t dcesrv_common_get_share_type(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
{
|
||||
/* for disk share 0x00000000
|
||||
* for print share 0x00000001
|
||||
@ -88,13 +88,13 @@ const char *dcesrv_common_get_share_password(TALLOC_CTX *mem_ctx, struct dcesrv_
|
||||
}
|
||||
|
||||
/* This hardcoded value should go into a ldb database! */
|
||||
uint32 dcesrv_common_get_share_csc_policy(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
uint32_t dcesrv_common_get_share_csc_policy(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* This hardcoded value should go into a ldb database! */
|
||||
uint32 dcesrv_common_get_share_unknown(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
uint32_t dcesrv_common_get_share_unknown(TALLOC_CTX *mem_ctx, struct dcesrv_context *dce_ctx, int snum)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ static const struct dcesrv_interface *find_interface(const struct dcesrv_endpoin
|
||||
see if a uuid and if_version match to an interface
|
||||
*/
|
||||
static BOOL interface_match_by_uuid(const struct dcesrv_interface *iface,
|
||||
const char *uuid, uint32 if_version)
|
||||
const char *uuid, uint32_t if_version)
|
||||
{
|
||||
if (iface->ndr->if_version != if_version) {
|
||||
return False;
|
||||
@ -117,7 +117,7 @@ static BOOL interface_match_by_uuid(const struct dcesrv_interface *iface,
|
||||
find the interface operations on an endpoint by uuid
|
||||
*/
|
||||
static const struct dcesrv_interface *find_interface_by_uuid(const struct dcesrv_endpoint *endpoint,
|
||||
const char *uuid, uint32 if_version)
|
||||
const char *uuid, uint32_t if_version)
|
||||
{
|
||||
struct dcesrv_if_list *ifl;
|
||||
for (ifl=endpoint->interface_list; ifl; ifl=ifl->next) {
|
||||
@ -347,7 +347,7 @@ static void dcesrv_init_hdr(struct dcerpc_packet *pkt)
|
||||
/*
|
||||
return a dcerpc fault
|
||||
*/
|
||||
static NTSTATUS dcesrv_fault(struct dcesrv_call_state *call, uint32 fault_code)
|
||||
static NTSTATUS dcesrv_fault(struct dcesrv_call_state *call, uint32_t fault_code)
|
||||
{
|
||||
struct dcerpc_packet pkt;
|
||||
struct dcesrv_call_reply *rep;
|
||||
@ -386,7 +386,7 @@ static NTSTATUS dcesrv_fault(struct dcesrv_call_state *call, uint32 fault_code)
|
||||
/*
|
||||
return a dcerpc bind_nak
|
||||
*/
|
||||
static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32 reason)
|
||||
static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32_t reason)
|
||||
{
|
||||
struct dcerpc_packet pkt;
|
||||
struct dcesrv_call_reply *rep;
|
||||
@ -426,11 +426,11 @@ static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32 reason)
|
||||
static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call)
|
||||
{
|
||||
const char *uuid, *transfer_syntax;
|
||||
uint32 if_version, transfer_syntax_version;
|
||||
uint32_t if_version, transfer_syntax_version;
|
||||
struct dcerpc_packet pkt;
|
||||
struct dcesrv_call_reply *rep;
|
||||
NTSTATUS status;
|
||||
uint32 result=0, reason=0;
|
||||
uint32_t result=0, reason=0;
|
||||
|
||||
if (call->pkt.u.bind.num_contexts != 1 ||
|
||||
call->pkt.u.bind.ctx_list[0].num_transfer_syntaxes < 1) {
|
||||
@ -558,7 +558,7 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call)
|
||||
void *r;
|
||||
NTSTATUS status;
|
||||
DATA_BLOB stub;
|
||||
uint32 total_length;
|
||||
uint32_t total_length;
|
||||
|
||||
|
||||
if (!call->conn->iface) {
|
||||
@ -619,7 +619,7 @@ static NTSTATUS dcesrv_request(struct dcesrv_call_state *call)
|
||||
total_length = stub.length;
|
||||
|
||||
do {
|
||||
uint32 length;
|
||||
uint32_t length;
|
||||
struct dcesrv_call_reply *rep;
|
||||
struct dcerpc_packet pkt;
|
||||
|
||||
@ -688,7 +688,7 @@ static BOOL dce_full_packet(const DATA_BLOB *data)
|
||||
/*
|
||||
we might have consumed only part of our input - advance past that part
|
||||
*/
|
||||
static void dce_partial_advance(struct dcesrv_connection *dce_conn, uint32 offset)
|
||||
static void dce_partial_advance(struct dcesrv_connection *dce_conn, uint32_t offset)
|
||||
{
|
||||
DATA_BLOB blob;
|
||||
|
||||
@ -761,7 +761,7 @@ NTSTATUS dcesrv_input_process(struct dcesrv_connection *dce_conn)
|
||||
/* see if this is a continued packet */
|
||||
if (!(call->pkt.pfc_flags & DCERPC_PFC_FLAG_FIRST)) {
|
||||
struct dcesrv_call_state *call2 = call;
|
||||
uint32 alloc_size;
|
||||
uint32_t alloc_size;
|
||||
|
||||
/* we only allow fragmented requests, no other packet types */
|
||||
if (call->pkt.ptype != DCERPC_PKT_REQUEST) {
|
||||
|
@ -39,7 +39,7 @@ struct dcesrv_ep_description {
|
||||
enum endpoint_type type;
|
||||
union {
|
||||
const char *smb_pipe;
|
||||
uint32 tcp_port;
|
||||
uint32_t tcp_port;
|
||||
} info;
|
||||
};
|
||||
|
||||
@ -79,7 +79,7 @@ struct dcesrv_call_state {
|
||||
} *replies;
|
||||
|
||||
/* this is used by the boilerplate code to generate DCERPC faults */
|
||||
uint32 fault_code;
|
||||
uint32_t fault_code;
|
||||
};
|
||||
|
||||
#define DCESRV_HANDLE_ANY 255
|
||||
@ -117,7 +117,7 @@ struct dcesrv_connection {
|
||||
struct dcesrv_call_state *call_list;
|
||||
|
||||
/* the maximum size the client wants to receive */
|
||||
uint32 cli_max_recv_frag;
|
||||
uint32_t cli_max_recv_frag;
|
||||
|
||||
/* private data for the interface implementation */
|
||||
void *private;
|
||||
@ -149,7 +149,7 @@ struct dcesrv_endpoint_server {
|
||||
* ask for a dcesrv_interface implementation
|
||||
* - iface must be referenz to an allready existent struct !
|
||||
*/
|
||||
BOOL (*interface_by_uuid)(struct dcesrv_interface *iface, const char *, uint32);
|
||||
BOOL (*interface_by_uuid)(struct dcesrv_interface *iface, const char *, uint32_t);
|
||||
|
||||
/* this function can be used by other endpoint servers to
|
||||
* ask for a dcesrv_interface implementation
|
||||
|
@ -191,7 +191,7 @@ void init_rpc_session(struct event_context *ev, void *private, int fd)
|
||||
*/
|
||||
static void setup_listen_rpc(struct event_context *events,
|
||||
const struct model_ops *model_ops,
|
||||
struct in_addr *ifip, uint32 *port,
|
||||
struct in_addr *ifip, uint32_t *port,
|
||||
struct rpc_server_context *r,
|
||||
const struct dcesrv_endpoint *endpoint)
|
||||
{
|
||||
|
@ -31,7 +31,7 @@ struct dcesrv_ep_iface {
|
||||
const char *name;
|
||||
struct dcesrv_ep_description ep_description;
|
||||
const char *uuid;
|
||||
uint32 if_version;
|
||||
uint32_t if_version;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -112,12 +112,12 @@ static BOOL fill_protocol_tower(TALLOC_CTX *mem_ctx, struct epm_towers *twr,
|
||||
/*
|
||||
build a list of all interfaces handled by all endpoint servers
|
||||
*/
|
||||
static uint32 build_ep_list(TALLOC_CTX *mem_ctx,
|
||||
static uint32_t build_ep_list(TALLOC_CTX *mem_ctx,
|
||||
struct dcesrv_endpoint *endpoint_list,
|
||||
struct dcesrv_ep_iface **eps)
|
||||
{
|
||||
struct dcesrv_endpoint *d;
|
||||
uint32 total = 0;
|
||||
uint32_t total = 0;
|
||||
|
||||
(*eps) = NULL;
|
||||
|
||||
@ -165,10 +165,10 @@ static NTSTATUS epm_Lookup(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_c
|
||||
{
|
||||
struct dcesrv_handle *h;
|
||||
struct rpc_eps {
|
||||
uint32 count;
|
||||
uint32_t count;
|
||||
struct dcesrv_ep_iface *e;
|
||||
} *eps;
|
||||
uint32 num_ents;
|
||||
uint32_t num_ents;
|
||||
int i;
|
||||
|
||||
h = dcesrv_handle_fetch(dce_call->conn, r->in.entry_handle, HTYPE_LOOKUP);
|
||||
@ -240,7 +240,7 @@ static NTSTATUS epm_Lookup(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_c
|
||||
static NTSTATUS epm_Map(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
|
||||
struct epm_Map *r)
|
||||
{
|
||||
uint32 count;
|
||||
uint32_t count;
|
||||
int i;
|
||||
struct dcesrv_ep_iface *eps;
|
||||
struct epm_floor *floors;
|
||||
|
@ -30,7 +30,7 @@ struct server_pipe_state {
|
||||
BOOL authenticated;
|
||||
char *account_name;
|
||||
char *computer_name; /* for logging only */
|
||||
uint32 acct_flags;
|
||||
uint32_t acct_flags;
|
||||
uint16 sec_chan_type;
|
||||
struct creds_CredentialState *creds;
|
||||
};
|
||||
@ -139,10 +139,10 @@ static NTSTATUS netr_ServerAuthenticateInternals(struct server_pipe_state *pipe_
|
||||
const char *account_name,
|
||||
const char *computer_name,
|
||||
uint16 secure_channel_type,
|
||||
uint32 in_flags,
|
||||
uint32_t in_flags,
|
||||
const struct netr_Credential *client_credentials,
|
||||
struct netr_Credential *server_credentials,
|
||||
uint32 *out_flags)
|
||||
uint32_t *out_flags)
|
||||
{
|
||||
void *sam_ctx;
|
||||
uint8 *mach_pwd;
|
||||
|
@ -154,7 +154,7 @@ static BOOL remote_fill_interface(struct dcesrv_interface *iface, const struct d
|
||||
return True;
|
||||
}
|
||||
|
||||
static BOOL remote_op_interface_by_uuid(struct dcesrv_interface *iface, const char *uuid, uint32 if_version)
|
||||
static BOOL remote_op_interface_by_uuid(struct dcesrv_interface *iface, const char *uuid, uint32_t if_version)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -405,7 +405,7 @@ static NTSTATUS samr_CreateDomainGroup(struct dcesrv_call_state *dce_call, TALLO
|
||||
struct dcesrv_handle *h;
|
||||
const char *name;
|
||||
struct ldb_message msg;
|
||||
uint32 rid;
|
||||
uint32_t rid;
|
||||
const char *groupname, *sidstr;
|
||||
time_t now = time(NULL);
|
||||
TALLOC_CTX *mem_ctx2;
|
||||
@ -549,7 +549,7 @@ static NTSTATUS samr_CreateUser2(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
||||
struct dcesrv_handle *h;
|
||||
const char *name;
|
||||
struct ldb_message msg;
|
||||
uint32 rid;
|
||||
uint32_t rid;
|
||||
const char *username, *sidstr;
|
||||
time_t now = time(NULL);
|
||||
TALLOC_CTX *mem_ctx2;
|
||||
@ -718,7 +718,7 @@ static NTSTATUS samr_CreateUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *
|
||||
struct samr_CreateUser *r)
|
||||
{
|
||||
struct samr_CreateUser2 r2;
|
||||
uint32 access_granted;
|
||||
uint32_t access_granted;
|
||||
|
||||
|
||||
/* a simple wrapper around samr_CreateUser2 works nicely */
|
||||
@ -873,8 +873,8 @@ static NTSTATUS samr_LookupNames(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
||||
return NT_STATUS_OK;
|
||||
}
|
||||
|
||||
r->out.rids.ids = talloc_array_p(mem_ctx, uint32, r->in.num_names);
|
||||
r->out.types.ids = talloc_array_p(mem_ctx, uint32, r->in.num_names);
|
||||
r->out.rids.ids = talloc_array_p(mem_ctx, uint32_t, r->in.num_names);
|
||||
r->out.types.ids = talloc_array_p(mem_ctx, uint32_t, r->in.num_names);
|
||||
if (!r->out.rids.ids || !r->out.types.ids) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
@ -885,7 +885,7 @@ static NTSTATUS samr_LookupNames(struct dcesrv_call_state *dce_call, TALLOC_CTX
|
||||
struct ldb_message **res;
|
||||
struct dom_sid2 *sid;
|
||||
const char *sidstr;
|
||||
uint32 atype, rtype;
|
||||
uint32_t atype, rtype;
|
||||
|
||||
r->out.rids.ids[i] = 0;
|
||||
r->out.types.ids[i] = SID_NAME_UNKNOWN;
|
||||
|
@ -39,7 +39,7 @@ struct samr_connect_state {
|
||||
int reference_count;
|
||||
void *sam_ctx;
|
||||
TALLOC_CTX *mem_ctx;
|
||||
uint32 access_mask;
|
||||
uint32_t access_mask;
|
||||
};
|
||||
|
||||
/*
|
||||
@ -50,7 +50,7 @@ struct samr_domain_state {
|
||||
int reference_count;
|
||||
void *sam_ctx;
|
||||
TALLOC_CTX *mem_ctx;
|
||||
uint32 access_mask;
|
||||
uint32_t access_mask;
|
||||
const char *domain_sid;
|
||||
const char *domain_name;
|
||||
const char *domain_dn;
|
||||
@ -63,7 +63,7 @@ struct samr_account_state {
|
||||
struct samr_domain_state *domain_state;
|
||||
void *sam_ctx;
|
||||
TALLOC_CTX *mem_ctx;
|
||||
uint32 access_mask;
|
||||
uint32_t access_mask;
|
||||
const char *account_sid;
|
||||
const char *account_name;
|
||||
const char *account_dn;
|
||||
|
@ -334,8 +334,8 @@ const char *samdb_result_string(struct ldb_message *msg, const char *attr,
|
||||
/*
|
||||
pull a rid from a objectSid in a result set.
|
||||
*/
|
||||
uint32 samdb_result_rid_from_sid(TALLOC_CTX *mem_ctx, struct ldb_message *msg,
|
||||
const char *attr, uint32 default_value)
|
||||
uint32_t samdb_result_rid_from_sid(TALLOC_CTX *mem_ctx, struct ldb_message *msg,
|
||||
const char *attr, uint32_t default_value)
|
||||
{
|
||||
struct dom_sid *sid;
|
||||
const char *sidstr = ldb_msg_find_string(msg, attr, NULL);
|
||||
@ -625,7 +625,7 @@ int samdb_copy_template(void *ctx, TALLOC_CTX *mem_ctx,
|
||||
return 0 on failure, the id on success
|
||||
*/
|
||||
static NTSTATUS _samdb_allocate_next_id(void *ctx, TALLOC_CTX *mem_ctx, const char *dn,
|
||||
const char *attr, uint32 *id)
|
||||
const char *attr, uint32_t *id)
|
||||
{
|
||||
struct samdb_context *sam_ctx = ctx;
|
||||
struct ldb_message msg;
|
||||
@ -696,7 +696,7 @@ static NTSTATUS _samdb_allocate_next_id(void *ctx, TALLOC_CTX *mem_ctx, const ch
|
||||
return 0 on failure, the id on success
|
||||
*/
|
||||
NTSTATUS samdb_allocate_next_id(void *ctx, TALLOC_CTX *mem_ctx, const char *dn, const char *attr,
|
||||
uint32 *id)
|
||||
uint32_t *id)
|
||||
{
|
||||
int tries = 10;
|
||||
NTSTATUS status;
|
||||
@ -824,7 +824,7 @@ int samdb_msg_add_hashes(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg
|
||||
add a acct_flags element to a message
|
||||
*/
|
||||
int samdb_msg_add_acct_flags(void *ctx, TALLOC_CTX *mem_ctx, struct ldb_message *msg,
|
||||
const char *attr_name, uint32 v)
|
||||
const char *attr_name, uint32_t v)
|
||||
{
|
||||
return samdb_msg_add_uint(ctx, mem_ctx, msg, attr_name, samdb_acb2uf(v));
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ NTSTATUS samr_OemChangePasswordUser2(struct dcesrv_call_state *dce_call, TALLOC_
|
||||
{
|
||||
NTSTATUS status;
|
||||
char new_pass[512];
|
||||
uint32 new_pass_len;
|
||||
uint32_t new_pass_len;
|
||||
struct samr_CryptPassword *pwbuf = r->in.password;
|
||||
void *sam_ctx;
|
||||
const char *user_dn, *domain_dn;
|
||||
@ -248,7 +248,7 @@ NTSTATUS samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call,
|
||||
{
|
||||
NTSTATUS status;
|
||||
char new_pass[512];
|
||||
uint32 new_pass_len;
|
||||
uint32_t new_pass_len;
|
||||
void *sam_ctx = NULL;
|
||||
const char *user_dn, *domain_dn = NULL;
|
||||
int ret;
|
||||
@ -261,7 +261,7 @@ NTSTATUS samr_ChangePasswordUser3(struct dcesrv_call_state *dce_call,
|
||||
struct samr_Hash *ntPwdHash;
|
||||
struct samr_DomInfo1 *dominfo;
|
||||
struct samr_ChangeReject *reject;
|
||||
uint32 reason = 0;
|
||||
uint32_t reason = 0;
|
||||
|
||||
ZERO_STRUCT(r->out);
|
||||
|
||||
@ -424,7 +424,7 @@ NTSTATUS samdb_set_password(void *ctx, TALLOC_CTX *mem_ctx,
|
||||
struct samr_Hash *lmNewHash,
|
||||
struct samr_Hash *ntNewHash,
|
||||
BOOL user_change,
|
||||
uint32 *reject_reason)
|
||||
uint32_t *reject_reason)
|
||||
{
|
||||
const char * const user_attrs[] = { "userAccountControl", "lmPwdHistory",
|
||||
"ntPwdHistory", "unicodePwd",
|
||||
@ -677,7 +677,7 @@ NTSTATUS samr_set_password(struct dcesrv_call_state *dce_call,
|
||||
struct samr_CryptPassword *pwbuf)
|
||||
{
|
||||
char new_pass[512];
|
||||
uint32 new_pass_len;
|
||||
uint32_t new_pass_len;
|
||||
DATA_BLOB session_key = dce_call->conn->session_key;
|
||||
|
||||
SamOEMhashBlob(pwbuf->data, 516, &session_key);
|
||||
|
@ -27,7 +27,7 @@ translated the ACB_CTRL Flags to UserFlags (userAccountControl)
|
||||
*/
|
||||
/* mapping between ADS userAccountControl and SAMR acct_flags */
|
||||
static const struct {
|
||||
uint32 uf;
|
||||
uint32_t uf;
|
||||
uint16 acb;
|
||||
} acct_flags_map[] = {
|
||||
{ UF_ACCOUNTDISABLE, ACB_DISABLED },
|
||||
@ -43,9 +43,9 @@ static const struct {
|
||||
{ UF_LOCKOUT, ACB_AUTOLOCK }
|
||||
};
|
||||
|
||||
uint32 samdb_acb2uf(uint16 acb)
|
||||
uint32_t samdb_acb2uf(uint16 acb)
|
||||
{
|
||||
uint32 i, ret = 0;
|
||||
uint32_t i, ret = 0;
|
||||
for (i=0;i<ARRAY_SIZE(acct_flags_map);i++) {
|
||||
if (acct_flags_map[i].acb & acb) {
|
||||
ret |= acct_flags_map[i].uf;
|
||||
@ -57,9 +57,9 @@ uint32 samdb_acb2uf(uint16 acb)
|
||||
/*
|
||||
translated the UserFlags (userAccountControl) to ACB_CTRL Flags
|
||||
*/
|
||||
uint16 samdb_uf2acb(uint32 uf)
|
||||
uint16 samdb_uf2acb(uint32_t uf)
|
||||
{
|
||||
uint32 i;
|
||||
uint32_t i;
|
||||
uint16 ret = 0;
|
||||
for (i=0;i<ARRAY_SIZE(acct_flags_map);i++) {
|
||||
if (acct_flags_map[i].uf & uf) {
|
||||
@ -72,9 +72,9 @@ uint16 samdb_uf2acb(uint32 uf)
|
||||
/*
|
||||
get the accountType from the UserFlags
|
||||
*/
|
||||
uint32 samdb_uf2atype(uint32 uf)
|
||||
uint32_t samdb_uf2atype(uint32_t uf)
|
||||
{
|
||||
uint32 atype = 0x00000000;
|
||||
uint32_t atype = 0x00000000;
|
||||
|
||||
if (uf & UF_NORMAL_ACCOUNT) atype = ATYPE_NORMAL_ACCOUNT;
|
||||
else if (uf & UF_TEMP_DUPLICATE_ACCOUNT) atype = ATYPE_NORMAL_ACCOUNT;
|
||||
@ -88,9 +88,9 @@ uint32 samdb_uf2atype(uint32 uf)
|
||||
/*
|
||||
get the accountType from the groupType
|
||||
*/
|
||||
uint32 samdb_gtype2atype(uint32 gtype)
|
||||
uint32_t samdb_gtype2atype(uint32_t gtype)
|
||||
{
|
||||
uint32 atype = 0x00000000;
|
||||
uint32_t atype = 0x00000000;
|
||||
|
||||
switch(gtype) {
|
||||
case GTYPE_SECURITY_BUILTIN_LOCAL_GROUP:
|
||||
@ -118,7 +118,7 @@ uint32 samdb_gtype2atype(uint32 gtype)
|
||||
}
|
||||
|
||||
/* turn a sAMAccountType into a SID_NAME_USE */
|
||||
enum SID_NAME_USE samdb_atype_map(uint32 atype)
|
||||
enum SID_NAME_USE samdb_atype_map(uint32_t atype)
|
||||
{
|
||||
switch (atype & 0xF0000000) {
|
||||
case ATYPE_GLOBAL_GROUP:
|
||||
|
@ -104,7 +104,7 @@ static int count_fn( TDB_CONTEXT *the_tdb, TDB_DATA kbuf, TDB_DATA dbuf, void *u
|
||||
Claim an entry in the connections database.
|
||||
****************************************************************************/
|
||||
|
||||
BOOL claim_connection(struct tcon_context *conn, const char *name,int max_connections,BOOL Clear, uint32 msg_flags)
|
||||
BOOL claim_connection(struct tcon_context *conn, const char *name,int max_connections,BOOL Clear, uint32_t msg_flags)
|
||||
{
|
||||
struct connections_key key;
|
||||
struct connections_data crec;
|
||||
@ -180,7 +180,7 @@ BOOL claim_connection(struct tcon_context *conn, const char *name,int max_connec
|
||||
return True;
|
||||
}
|
||||
|
||||
BOOL register_message_flags(BOOL doreg, uint32 msg_flags)
|
||||
BOOL register_message_flags(BOOL doreg, uint32_t msg_flags)
|
||||
{
|
||||
struct connections_key key;
|
||||
struct connections_data *pcrec;
|
||||
|
@ -67,7 +67,7 @@ static NTSTATUS nttrans_ioctl(struct request_context *req,
|
||||
struct smb_nttrans *trans)
|
||||
{
|
||||
union smb_ioctl nt;
|
||||
uint32 function;
|
||||
uint32_t function;
|
||||
uint16 fnum;
|
||||
uint8 filter;
|
||||
BOOL fsctl;
|
||||
|
@ -671,7 +671,7 @@ void reply_readbraw(struct request_context *req)
|
||||
|
||||
/* the 64 bit varient */
|
||||
if (req->in.wct == 10) {
|
||||
uint32 offset_high = IVAL(req->in.vwv, VWV(8));
|
||||
uint32_t offset_high = IVAL(req->in.vwv, VWV(8));
|
||||
io.readbraw.in.offset |= (((SMB_OFF_T)offset_high) << 32);
|
||||
}
|
||||
|
||||
@ -877,7 +877,7 @@ void reply_read_and_X(struct request_context *req)
|
||||
|
||||
/* the 64 bit varient */
|
||||
if (req->in.wct == 12) {
|
||||
uint32 offset_high = IVAL(req->in.vwv, VWV(10));
|
||||
uint32_t offset_high = IVAL(req->in.vwv, VWV(10));
|
||||
io->readx.in.offset |= (((uint64_t)offset_high) << 32);
|
||||
}
|
||||
|
||||
@ -1064,10 +1064,10 @@ void reply_write_and_X(struct request_context *req)
|
||||
io->writex.in.data = req->in.hdr + SVAL(req->in.vwv, VWV(11));
|
||||
|
||||
if (req->in.wct == 14) {
|
||||
uint32 offset_high = IVAL(req->in.vwv, VWV(12));
|
||||
uint32_t offset_high = IVAL(req->in.vwv, VWV(12));
|
||||
uint16 count_high = SVAL(req->in.vwv, VWV(9));
|
||||
io->writex.in.offset |= (((uint64_t)offset_high) << 32);
|
||||
io->writex.in.count |= ((uint32)count_high) << 16;
|
||||
io->writex.in.count |= ((uint32_t)count_high) << 16;
|
||||
}
|
||||
|
||||
/* make sure the data is in bounds */
|
||||
@ -1754,7 +1754,7 @@ void reply_lockingX(struct request_context *req)
|
||||
|
||||
/* construct the locks array */
|
||||
for (i=0;i<total_locks;i++) {
|
||||
uint32 ofs_high=0, count_high=0;
|
||||
uint32_t ofs_high=0, count_high=0;
|
||||
|
||||
lck->lockx.in.locks[i].pid = SVAL(p, 0);
|
||||
|
||||
|
@ -81,7 +81,7 @@ struct request_context *init_smb_request(struct server_context *smb)
|
||||
*/
|
||||
static void req_setup_chain_reply(struct request_context *req, unsigned wct, unsigned buflen)
|
||||
{
|
||||
uint32 chain_base_size = req->out.size;
|
||||
uint32_t chain_base_size = req->out.size;
|
||||
|
||||
/* we need room for the wct value, the words, the buffer length and the buffer */
|
||||
req->out.size += 1 + VWV(wct) + 2 + buflen;
|
||||
@ -321,7 +321,7 @@ void req_reply_error(struct request_context *req, NTSTATUS status)
|
||||
if (!lp_nt_status_support() || !(req->smb->negotiate.client_caps & CAP_STATUS32)) {
|
||||
/* convert to DOS error codes */
|
||||
uint8 eclass;
|
||||
uint32 ecode;
|
||||
uint32_t ecode;
|
||||
ntstatus_to_dos(status, &eclass, &ecode);
|
||||
req_reply_dos_error(req, eclass, ecode);
|
||||
return;
|
||||
@ -597,7 +597,7 @@ BOOL req_pull_blob(struct request_context *req, const char *src, int len, DATA_B
|
||||
|
||||
/* check that a lump of data in a request is within the bounds of the data section of
|
||||
the packet */
|
||||
BOOL req_data_oob(struct request_context *req, const char *ptr, uint32 count)
|
||||
BOOL req_data_oob(struct request_context *req, const char *ptr, uint32_t count)
|
||||
{
|
||||
if (count == 0) {
|
||||
return False;
|
||||
|
@ -69,12 +69,12 @@ static void find_fill_info(struct request_context *req,
|
||||
union smb_search_data *file)
|
||||
{
|
||||
char *p = req->out.data + req->out.data_size;
|
||||
uint32 dos_date;
|
||||
uint32_t dos_date;
|
||||
char search_name[13];
|
||||
|
||||
DEBUG(9,("find_fill_info: input file data: attr=0x%x size=%u time=0x%x name=%13s\n",
|
||||
file->search.attrib, file->search.size,
|
||||
(uint32)file->search.write_time, file->search.name));
|
||||
(uint32_t)file->search.write_time, file->search.name));
|
||||
|
||||
p += req_append_bytes(req, file->search.search_id.data, 21);
|
||||
p += req_append_bytes(req, (char*)&file->search.attrib, 1);
|
||||
|
@ -500,7 +500,7 @@ static NTSTATUS trans2_fileinfo_fill(struct request_context *req, struct smb_tra
|
||||
SSVAL(trans->out.params.data, 0, 0);
|
||||
SIVAL(trans->out.data.data, 0, 0);
|
||||
} else {
|
||||
uint32 list_size = ea_list_size(st->all_eas.out.num_eas,
|
||||
uint32_t list_size = ea_list_size(st->all_eas.out.num_eas,
|
||||
st->all_eas.out.eas);
|
||||
trans2_setup_reply(req, trans, 2, list_size, 0);
|
||||
SSVAL(trans->out.params.data, 0, 0);
|
||||
@ -694,7 +694,7 @@ static NTSTATUS trans2_parse_sfileinfo(struct request_context *req,
|
||||
union smb_setfileinfo *st,
|
||||
const DATA_BLOB *blob)
|
||||
{
|
||||
uint32 len;
|
||||
uint32_t len;
|
||||
|
||||
switch (st->generic.level) {
|
||||
case RAW_SFILEINFO_GENERIC:
|
||||
|
@ -526,7 +526,7 @@ void build_options(BOOL screen)
|
||||
output(screen," sizeof(long): %d\n",sizeof(long));
|
||||
output(screen," sizeof(uint8): %d\n",sizeof(uint8));
|
||||
output(screen," sizeof(uint16): %d\n",sizeof(uint16));
|
||||
output(screen," sizeof(uint32): %d\n",sizeof(uint32));
|
||||
output(screen," sizeof(uint32_t): %d\n",sizeof(uint32_t));
|
||||
output(screen," sizeof(short): %d\n",sizeof(short));
|
||||
output(screen," sizeof(void*): %d\n",sizeof(void*));
|
||||
}
|
||||
|
@ -192,16 +192,16 @@ static int thread_mutex_lock(smb_mutex_t *mutexP, const char *name)
|
||||
if (rc == EBUSY) {
|
||||
mutex_start_timer(&tp1);
|
||||
printf("mutex lock: thread %d, lock %s not available\n",
|
||||
(uint32)pthread_self(), name);
|
||||
(uint32_t)pthread_self(), name);
|
||||
print_suspicious_usage("mutex_lock", name);
|
||||
pthread_mutex_lock(mutex);
|
||||
t = mutex_end_timer(tp1);
|
||||
printf("mutex lock: thread %d, lock %s now available, waited %g seconds\n",
|
||||
(uint32)pthread_self(), name, t);
|
||||
(uint32_t)pthread_self(), name, t);
|
||||
return 0;
|
||||
}
|
||||
printf("mutex lock: thread %d, lock %s failed rc=%d\n",
|
||||
(uint32)pthread_self(), name, rc);
|
||||
(uint32_t)pthread_self(), name, rc);
|
||||
SMB_ASSERT(errno == 0); /* force error */
|
||||
}
|
||||
return 0;
|
||||
@ -254,16 +254,16 @@ static int thread_rwlock_lock_read(smb_rwlock_t *rwlockP, const char *name)
|
||||
if (rc == EBUSY) {
|
||||
mutex_start_timer(&tp1);
|
||||
printf("rwlock lock_read: thread %d, lock %s not available\n",
|
||||
(uint32)pthread_self(), name);
|
||||
(uint32_t)pthread_self(), name);
|
||||
print_suspicious_usage("rwlock_lock_read", name);
|
||||
pthread_rwlock_rdlock(rwlock);
|
||||
t = mutex_end_timer(tp1);
|
||||
printf("rwlock lock_read: thread %d, lock %s now available, waited %g seconds\n",
|
||||
(uint32)pthread_self(), name, t);
|
||||
(uint32_t)pthread_self(), name, t);
|
||||
return 0;
|
||||
}
|
||||
printf("rwlock lock_read: thread %d, lock %s failed rc=%d\n",
|
||||
(uint32)pthread_self(), name, rc);
|
||||
(uint32_t)pthread_self(), name, rc);
|
||||
SMB_ASSERT(errno == 0); /* force error */
|
||||
}
|
||||
return 0;
|
||||
@ -283,16 +283,16 @@ static int thread_rwlock_lock_write(smb_rwlock_t *rwlockP, const char *name)
|
||||
if (rc == EBUSY) {
|
||||
mutex_start_timer(&tp1);
|
||||
printf("rwlock lock_write: thread %d, lock %s not available\n",
|
||||
(uint32)pthread_self(), name);
|
||||
(uint32_t)pthread_self(), name);
|
||||
print_suspicious_usage("rwlock_lock_write", name);
|
||||
pthread_rwlock_wrlock(rwlock);
|
||||
t = mutex_end_timer(tp1);
|
||||
printf("rwlock lock_write: thread %d, lock %s now available, waited %g seconds\n",
|
||||
(uint32)pthread_self(), name, t);
|
||||
(uint32_t)pthread_self(), name, t);
|
||||
return 0;
|
||||
}
|
||||
printf("rwlock lock_write: thread %d, lock %s failed rc=%d\n",
|
||||
(uint32)pthread_self(), name, rc);
|
||||
(uint32_t)pthread_self(), name, rc);
|
||||
SMB_ASSERT(errno == 0); /* force error */
|
||||
}
|
||||
return 0;
|
||||
@ -354,16 +354,16 @@ static void thread_print_suspicious_usage(const char* from, const char* info)
|
||||
#endif
|
||||
}
|
||||
|
||||
static uint32 thread_get_task_id(void)
|
||||
static uint32_t thread_get_task_id(void)
|
||||
{
|
||||
return (uint32)pthread_self();
|
||||
return (uint32_t)pthread_self();
|
||||
}
|
||||
|
||||
static void thread_log_task_id(int fd)
|
||||
{
|
||||
char *s;
|
||||
|
||||
asprintf(&s, "thread %u: ", (uint32)pthread_self());
|
||||
asprintf(&s, "thread %u: ", (uint32_t)pthread_self());
|
||||
write(fd, s, strlen(s));
|
||||
free(s);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ BOOL share_info_db_init(void)
|
||||
BOOL init_registry(void)
|
||||
{ return True; }
|
||||
|
||||
BOOL share_access_check(struct request_context *req, struct tcon_context *conn, int snum, uint32 desired_access)
|
||||
BOOL share_access_check(struct request_context *req, struct tcon_context *conn, int snum, uint32_t desired_access)
|
||||
{ return True; }
|
||||
|
||||
BOOL init_names(void)
|
||||
|
@ -302,7 +302,7 @@ static void setup_process_model(struct event_context *events,
|
||||
/* Output the build options to the debug log */
|
||||
build_options(False);
|
||||
|
||||
if (sizeof(uint16) < 2 || sizeof(uint32) < 4) {
|
||||
if (sizeof(uint16) < 2 || sizeof(uint32_t) < 4) {
|
||||
DEBUG(0,("ERROR: Samba is not configured correctly for the word size on your machine\n"));
|
||||
exit(1);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user