static void ctdbd_socket_handler(struct tevent_context *event_ctx,
struct tevent_fd *event,
- uint16 flags,
+ uint16_t flags,
void *private_data)
{
struct ctdbd_connection *conn = talloc_get_type_abort(
reply = (struct ctdb_reply_control *)hdr;
if (outdata) {
- if (!(outdata->dptr = (uint8 *)talloc_memdup(
+ if (!(outdata->dptr = (uint8_t *)talloc_memdup(
mem_ctx, reply->data, reply->datalen))) {
TALLOC_FREE(reply);
return NT_STATUS_NO_MEMORY;
for (fde = ev->fd_events; fde; fde = fde->next) {
struct pollfd *pfd;
- uint16 flags = 0;
+ uint16_t flags = 0;
if ((fde->flags & (TEVENT_FD_READ|TEVENT_FD_WRITE)) == 0) {
continue;
struct messaging_callback {
struct messaging_callback *prev, *next;
- uint32 msg_type;
+ uint32_t msg_type;
void (*fn)(struct messaging_context *msg, void *private_data,
uint32_t msg_type,
struct server_id server_id, DATA_BLOB *data);
struct msg_all {
struct messaging_context *msg_ctx;
int msg_type;
- uint32 msg_flag;
+ uint32_t msg_flag;
const void *buf;
size_t len;
int n_sent;
rec = (struct messaging_rec) {
.msg_version = MESSAGE_VERSION,
- .buf.data = discard_const_p(uint8, msg) + sizeof(hdr),
+ .buf.data = discard_const_p(uint8_t, msg) + sizeof(hdr),
.buf.length = msg_len - sizeof(hdr),
.num_fds = num_fds,
.fds = fds64,
{
XFILE *auth;
fstring buf;
- uint16 len = 0;
+ uint16_t len = 0;
char *ptr, *val, *param;
if ((auth=x_fopen(file, O_RDONLY, 0)) == NULL)
int sys_get_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 qflags = 0;
+ uint32_t qflags = 0;
struct dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 qflags = 0;
- uint32 oldqflags = 0;
+ uint32_t qflags = 0;
+ uint32_t oldqflags = 0;
struct dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
static int sys_get_linux_v1_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 qflags = 0;
+ uint32_t qflags = 0;
struct v1_kern_dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
static int sys_set_linux_v1_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 qflags = 0;
- uint32 oldqflags = 0;
+ uint32_t qflags = 0;
+ uint32_t oldqflags = 0;
struct v1_kern_dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
static int sys_get_linux_v2_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 qflags = 0;
+ uint32_t qflags = 0;
struct v2_kern_dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
static int sys_set_linux_v2_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 qflags = 0;
- uint32 oldqflags = 0;
+ uint32_t qflags = 0;
+ uint32_t oldqflags = 0;
struct v2_kern_dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
static int sys_get_linux_gen_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 qflags = 0;
+ uint32_t qflags = 0;
struct if_dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
static int sys_set_linux_gen_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 qflags = 0;
- uint32 oldqflags = 0;
+ uint32_t qflags = 0;
+ uint32_t oldqflags = 0;
struct if_dqblk D;
uint64_t bsize = (uint64_t)QUOTABLOCK_SIZE;
int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 oldqflags = 0;
+ uint32_t oldqflags = 0;
if (!path||!bdev||!dp)
smb_panic("sys_set_vfs_quota: called with NULL pointer");
enum clnt_stat clnt_stat;
int ret = -1;
- uint32 qflags = 0;
+ uint32_t qflags = 0;
if (!path || !bdev || !dp) {
smb_panic("sys_get_nfs_quota: called with NULL pointer");
int sys_get_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 qflags = 0;
+ uint32_t qflags = 0;
uint64_t bsize = (uint64_t)BBSIZE;
struct fs_disk_quota D;
struct fs_quota_stat F;
int sys_set_xfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *dp)
{
int ret = -1;
- uint32 qflags = 0;
+ uint32_t qflags = 0;
uint64_t bsize = (uint64_t)BBSIZE;
struct fs_disk_quota D;
struct fs_quota_stat F;
uint32_t unix_dev_major(SMB_DEV_T dev)
{
#if defined(HAVE_DEVICE_MAJOR_FN)
- return (uint32)major(dev);
+ return (uint32_t)major(dev);
#else
- return (uint32)(dev >> 8);
+ return (uint32_t)(dev >> 8);
#endif
}
uint32_t unix_dev_minor(SMB_DEV_T dev)
{
#if defined(HAVE_DEVICE_MINOR_FN)
- return (uint32)minor(dev);
+ return (uint32_t)minor(dev);
#else
- return (uint32)(dev & 0xff);
+ return (uint32_t)(dev & 0xff);
#endif
}
size_t newlen = smb_len(*outbuf) + 4 + blob.length;
uint8_t *tmp;
- if (!(tmp = talloc_realloc(NULL, *outbuf, uint8, newlen))) {
+ if (!(tmp = talloc_realloc(NULL, *outbuf, uint8_t, newlen))) {
DEBUG(0, ("talloc failed\n"));
return -1;
}
return DENY_FCB;
}
- return (uint32)-1;
+ return (uint32_t)-1;
}
pid_t procid_to_pid(const struct server_id *proc)
struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used)
{
struct ea_list *eal = talloc_zero(ctx, struct ea_list);
- uint16 val_len;
+ uint16_t val_len;
unsigned int namelen;
size_t converted_size;
struct perm_value {
const char *perm;
- uint32 mask;
+ uint32_t mask;
};
static const struct perm_value special_values[] = {
enum lsa_SidType *type,
char **domain, char **name)
{
- uint16 orig_cnum = cli_state_get_tid(cli);
+ uint16_t orig_cnum = cli_state_get_tid(cli);
struct rpc_pipe_client *p = NULL;
struct policy_handle handle;
NTSTATUS status;
enum lsa_SidType *type,
struct dom_sid *sid)
{
- uint16 orig_cnum = cli_state_get_tid(cli);
+ uint16_t orig_cnum = cli_state_get_tid(cli);
struct rpc_pipe_client *p;
struct policy_handle handle;
NTSTATUS status;
const struct perm_value *v;
fstring sidstr;
int do_print = 0;
- uint32 got_mask;
+ uint32_t got_mask;
SidToString(cli, sidstr, &ace->trustee, numeric);
struct security_descriptor *sd, bool numeric)
{
fstring sidstr;
- uint32 i;
+ uint32_t i;
fprintf(f, "REVISION:%d\n", sd->revision);
print_acl_ctrl(f, sd->type, numeric);
integers and strings.
****************************************************************************/
-static size_t tdb_pack_va(uint8 *buf, int bufsize, const char *fmt, va_list ap)
+static size_t tdb_pack_va(uint8_t *buf, int bufsize, const char *fmt, va_list ap)
{
- uint8 bt;
- uint16 w;
- uint32 d;
+ uint8_t bt;
+ uint16_t w;
+ uint32_t d;
int i;
void *p;
int len;
char *s;
char c;
- uint8 *buf0 = buf;
+ uint8_t *buf0 = buf;
const char *fmt0 = fmt;
int bufsize0 = bufsize;
switch ((c = *fmt++)) {
case 'b': /* unsigned 8-bit integer */
len = 1;
- bt = (uint8)va_arg(ap, int);
+ bt = (uint8_t)va_arg(ap, int);
if (bufsize && bufsize >= len)
SSVAL(buf, 0, bt);
break;
case 'w': /* unsigned 16-bit integer */
len = 2;
- w = (uint16)va_arg(ap, int);
+ w = (uint16_t)va_arg(ap, int);
if (bufsize && bufsize >= len)
SSVAL(buf, 0, w);
break;
case 'd': /* signed 32-bit integer (standard int in most systems) */
len = 4;
- d = va_arg(ap, uint32);
+ d = va_arg(ap, uint32_t);
if (bufsize && bufsize >= len)
SIVAL(buf, 0, d);
break;
return PTR_DIFF(buf, buf0);
}
-size_t tdb_pack(uint8 *buf, int bufsize, const char *fmt, ...)
+size_t tdb_pack(uint8_t *buf, int bufsize, const char *fmt, ...)
{
va_list ap;
size_t result;
return result;
}
-bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8 **buf, size_t *len,
+bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8_t **buf, size_t *len,
const char *fmt, ...)
{
va_list ap;
va_end(ap);
if (mem_ctx != NULL) {
- *buf = talloc_realloc(mem_ctx, *buf, uint8,
+ *buf = talloc_realloc(mem_ctx, *buf, uint8_t,
(*len) + len1);
} else {
- *buf = SMB_REALLOC_ARRAY(*buf, uint8, (*len) + len1);
+ *buf = SMB_REALLOC_ARRAY(*buf, uint8_t, (*len) + len1);
}
if (*buf == NULL) {
integers and strings.
****************************************************************************/
-int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...)
+int tdb_unpack(const uint8_t *buf, int bufsize, const char *fmt, ...)
{
va_list ap;
- uint8 *bt;
- uint16 *w;
- uint32 *d;
+ uint8_t *bt;
+ uint16_t *w;
+ uint32_t *d;
int len;
int *i;
void **p;
char *s, **b, **ps;
char c;
- const uint8 *buf0 = buf;
+ const uint8_t *buf0 = buf;
const char *fmt0 = fmt;
int bufsize0 = bufsize;
switch ((c=*fmt++)) {
case 'b': /* unsigned 8-bit integer */
len = 1;
- bt = va_arg(ap, uint8 *);
+ bt = va_arg(ap, uint8_t *);
if (bufsize < len)
goto no_space;
*bt = SVAL(buf, 0);
break;
case 'w': /* unsigned 16-bit integer */
len = 2;
- w = va_arg(ap, uint16 *);
+ w = va_arg(ap, uint16_t *);
if (bufsize < len)
goto no_space;
*w = SVAL(buf, 0);
break;
case 'd': /* unsigned 32-bit integer (standard int in most systems) */
len = 4;
- d = va_arg(ap, uint32 *);
+ d = va_arg(ap, uint32_t *);
if (bufsize < len)
goto no_space;
*d = IVAL(buf, 0);
#include "../libcli/security/security.h"
struct rid_name_map {
- uint32 rid;
+ uint32_t rid;
const char *name;
};
{
int i;
struct dom_sid dom_sid;
- uint32 rid;
+ uint32_t rid;
const struct rid_name_map *users = NULL;
sid_copy(&dom_sid, sid);
bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
const struct dom_sid *domain_sid,
- int num_rids, uint32 *rids,
+ int num_rids, uint32_t *rids,
const char **domain_name,
const char ***names, enum lsa_SidType **types)
{
bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
const struct dom_sid *domain_sid,
- int num_rids, uint32 *rids,
+ int num_rids, uint32_t *rids,
const char **domain_name,
const char ***names, enum lsa_SidType **types)
{
wbcErr wb_is_trusted_domain(const char *domain);
bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
const struct dom_sid *domain_sid,
- int num_rids, uint32 *rids,
+ int num_rids, uint32_t *rids,
const char **domain_name,
const char ***names, enum lsa_SidType **types);
bool winbind_allocate_uid(uid_t *uid);