I still need to fix the rpc stuff, but we are almost there.
Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 14 22:16:56 CEST 2015 on sn-devel-104
fp.write(" output(screen, \" sizeof(int): %lu\\n\",(unsigned long)sizeof(int));\n")
fp.write(" output(screen, \" sizeof(long): %lu\\n\",(unsigned long)sizeof(long));\n")
fp.write(" output(screen, \" sizeof(long long): %lu\\n\",(unsigned long)sizeof(long long));\n")
- fp.write(" output(screen, \" sizeof(uint8): %lu\\n\",(unsigned long)sizeof(uint8));\n")
- fp.write(" output(screen, \" sizeof(uint16): %lu\\n\",(unsigned long)sizeof(uint16));\n")
- fp.write(" output(screen, \" sizeof(uint32): %lu\\n\",(unsigned long)sizeof(uint32));\n")
+ fp.write(" output(screen, \" sizeof(uint8_t): %lu\\n\",(unsigned long)sizeof(uint8_t));\n")
+ fp.write(" output(screen, \" sizeof(uint16_t): %lu\\n\",(unsigned long)sizeof(uint16_t));\n")
+ fp.write(" output(screen, \" sizeof(uint32_t): %lu\\n\",(unsigned long)sizeof(uint32_t));\n")
fp.write(" output(screen, \" sizeof(short): %lu\\n\",(unsigned long)sizeof(short));\n")
fp.write(" output(screen, \" sizeof(void*): %lu\\n\",(unsigned long)sizeof(void*));\n")
fp.write(" output(screen, \" sizeof(size_t): %lu\\n\",(unsigned long)sizeof(size_t));\n")
struct shadow_copy_data *shadow_copy_data,
bool labels)
{
- uint32 num = 3;
- uint32 i;
+ uint32_t num = 3;
+ uint32_t i;
shadow_copy_data->num_volumes = num;
}
static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname,
- const char *mask, uint32 attr)
+ const char *mask, uint32_t attr)
{
return NULL;
}
}
static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
- const char *mask, uint32 attr)
+ const char *mask, uint32_t attr)
{
return NULL;
}
static int skel_kernel_flock(struct vfs_handle_struct *handle,
struct files_struct *fsp,
- uint32 share_mode, uint32 access_mask)
+ uint32_t share_mode, uint32_t access_mask)
{
errno = ENOSYS;
return -1;
}
static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
- uint32 security_info,
+ uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
}
static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
- const char *name, uint32 security_info,
+ const char *name, uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
}
static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
- uint32 security_info_sent,
+ uint32_t security_info_sent,
const struct security_descriptor *psd)
{
return NT_STATUS_NOT_IMPLEMENTED;
}
static DIR *skel_opendir(vfs_handle_struct *handle, const char *fname,
- const char *mask, uint32 attr)
+ const char *mask, uint32_t attr)
{
return SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr);
}
}
static DIR *skel_fdopendir(vfs_handle_struct *handle, files_struct *fsp,
- const char *mask, uint32 attr)
+ const char *mask, uint32_t attr)
{
return SMB_VFS_NEXT_FDOPENDIR(handle, fsp, mask, attr);
}
}
static int skel_kernel_flock(struct vfs_handle_struct *handle,
- struct files_struct *fsp, uint32 share_mode,
- uint32 access_mask)
+ struct files_struct *fsp, uint32_t share_mode,
+ uint32_t access_mask)
{
return SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode, access_mask);
}
}
static NTSTATUS skel_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
- uint32 security_info,
+ uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
}
static NTSTATUS skel_get_nt_acl(vfs_handle_struct *handle,
- const char *name, uint32 security_info,
+ const char *name, uint32_t security_info,
TALLOC_CTX *mem_ctx,
struct security_descriptor **ppdesc)
{
}
static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
- uint32 security_info_sent,
+ uint32_t security_info_sent,
const struct security_descriptor *psd)
{
return SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd);
DEBUG(1, ("INFO: Received REQ_DEBUGLEVEL message from PID %s\n",
server_id_str_buf(src, &tmp)));
messaging_send_buf(msg_ctx, src, MSG_DEBUGLEVEL,
- (uint8 *)message, strlen(message) + 1);
+ (uint8_t *)message, strlen(message) + 1);
TALLOC_FREE(message);
}
return security_token_has_sid(token, sid);
}
-bool nt_token_check_domain_rid( struct security_token *token, uint32 rid )
+bool nt_token_check_domain_rid( struct security_token *token, uint32_t rid )
{
struct dom_sid domain_sid;
NTSTATUS add_aliases(const struct dom_sid *domain_sid,
struct security_token *token)
{
- uint32 *aliases;
+ uint32_t *aliases;
size_t i, num_aliases;
NTSTATUS status;
TALLOC_CTX *tmp_ctx;
SMBC_getatr(SMBCCTX * context,
SMBCSRV *srv,
const char *path,
- uint16 *mode,
+ uint16_t *mode,
off_t *size,
struct timespec *create_time_ts,
struct timespec *access_time_ts,
time_t access_time,
time_t write_time,
time_t change_time,
- uint16 mode);
+ uint16_t mode);
off_t
SMBC_lseek_ctx(SMBCCTX *context,
const SMB_STRUCT_STAT *sbuf2);
void show_msg(const char *buf);
int set_message_bcc(char *buf,int num_bytes);
-ssize_t message_push_blob(uint8 **outbuf, DATA_BLOB blob);
+ssize_t message_push_blob(uint8_t **outbuf, DATA_BLOB blob);
char *unix_clean_name(TALLOC_CTX *ctx, const char *s);
char *clean_name(TALLOC_CTX *ctx, const char *s);
ssize_t write_data_at_offset(int fd, const char *buffer, size_t N, off_t pos);
char *OIDs[ASN1_MAX_OIDS],
char **principal,
DATA_BLOB *secblob);
-DATA_BLOB spnego_gen_krb5_wrap(TALLOC_CTX *ctx, const DATA_BLOB ticket, const uint8 tok_id[2]);
+DATA_BLOB spnego_gen_krb5_wrap(TALLOC_CTX *ctx, const DATA_BLOB ticket, const uint8_t tok_id[2]);
int spnego_gen_krb5_negTokenInit(TALLOC_CTX *ctx,
const char *principal, int time_offset,
DATA_BLOB *targ,
/* The following definitions come from libsmb/errormap.c */
-NTSTATUS dos_to_ntstatus(uint8 eclass, uint32_t ecode);
+NTSTATUS dos_to_ntstatus(uint8_t eclass, uint32_t ecode);
/* The following definitions come from libsmb/namecache.c */
/* The following definitions come from libsmb/smberr.c */
-const char *smb_dos_err_name(uint8 e_class, uint16 num);
+const char *smb_dos_err_name(uint8_t e_class, uint16_t num);
const char *get_dos_error_msg(WERROR result);
-const char *smb_dos_err_class(uint8 e_class);
+const char *smb_dos_err_class(uint8_t e_class);
WERROR map_werror_from_unix(int error);
/* The following definitions come from libsmb/trustdom_cache.c */
**********************************************************************/
#define OUR_HANDLE(hnd) (((hnd)==NULL) ? "NULL" :\
- ( IVAL((hnd)->uuid.node,2) == (uint32)getpid() ? "OURS" : \
+ ( IVAL((hnd)->uuid.node,2) == (uint32_t)getpid() ? "OURS" : \
"OTHER")), ((unsigned int)IVAL((hnd)->uuid.node,2)),\
((unsigned int)getpid() )
};
struct ea_struct {
- uint8 flags;
+ uint8_t flags;
char *name;
DATA_BLOB value;
};
* The tdb_unpack() and tdb_pack[_append]() helpers are deprecated. Consider
* using idl/ndr for marshalling of complex data types instead.
*/
-int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...);
-size_t tdb_pack(uint8 *buf, int bufsize, const char *fmt, ...);
-bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8 **buf, size_t *len,
+int tdb_unpack(const uint8_t *buf, int bufsize, const char *fmt, ...);
+size_t tdb_pack(uint8_t *buf, int bufsize, const char *fmt, ...);
+bool tdb_pack_append(TALLOC_CTX *mem_ctx, uint8_t **buf, size_t *len,
const char *fmt, ...);
struct tdb_context *tdb_open_log(const char *name, int hash_size,
static sbcErr smbconf_reg_open_service_key(TALLOC_CTX *mem_ctx,
struct smbconf_ctx *ctx,
const char *servicename,
- uint32 desired_access,
+ uint32_t desired_access,
struct registry_key **key)
{
WERROR werr;
break;
}
case REG_MULTI_SZ: {
- uint32 j;
+ uint32_t j;
const char **a = NULL;
if (!pull_reg_multi_sz(mem_ctx, &value->data, &a)) {
break;
uint32_t ads_get_kvno(ADS_STRUCT *ads, const char *account_name)
{
LDAPMessage *res = NULL;
- uint32_t kvno = (uint32)-1; /* -1 indicates a failure */
+ uint32_t kvno = (uint32_t)-1; /* -1 indicates a failure */
char *filter;
const char *attrs[] = {"msDS-KeyVersionNumber", NULL};
char *dn_string = NULL;
ads->ldap.in.left = 0;
ads->ldap.in.size = 4 + ads->ldap.in.min_wrapped;
ads->ldap.in.buf = talloc_array(ads->ldap.mem_ctx,
- uint8, ads->ldap.in.size);
+ uint8_t, ads->ldap.in.size);
if (!ads->ldap.in.buf) {
return -1;
}
ads->ldap.in.size = 4 + ads->ldap.in.needed;
ads->ldap.in.buf = talloc_realloc(ads->ldap.mem_ctx,
ads->ldap.in.buf,
- uint8, ads->ldap.in.size);
+ uint8_t, ads->ldap.in.size);
if (!ads->ldap.in.buf) {
return -1;
}
ads->ldap.out.left = 0;
ads->ldap.out.size = 4 + ads->ldap.out.sig_size + len;
ads->ldap.out.buf = talloc_array(ads->ldap.mem_ctx,
- uint8, ads->ldap.out.size);
+ uint8_t, ads->ldap.out.size);
if (!ads->ldap.out.buf) {
return -1;
}
ret = ads_saslwrap_prepare_outbuf(ads, rlen);
if (ret < 0) return ret;
- status = ads->ldap.wrap_ops->wrap(ads, (uint8 *)buf, rlen);
+ status = ads->ldap.wrap_ops->wrap(ads, (uint8_t *)buf, rlen);
if (!ADS_ERR_OK(status)) {
errno = EACCES;
return -1;
Set the PID to use for smb messages. Return the old pid.
****************************************************************************/
-uint16_t cli_setpid(struct cli_state *cli, uint16 pid)
+uint16_t cli_setpid(struct cli_state *cli, uint16_t pid)
{
uint16_t ret = cli->smb1.pid;
cli->smb1.pid = pid;
}
NTSTATUS cli_set_unix_extensions_capabilities(struct cli_state *cli,
- uint16_t major, uint16 minor,
- uint32_t caplow, uint32 caphigh)
+ uint16_t major, uint16_t minor,
+ uint32_t caplow, uint32_t caphigh)
{
struct tevent_context *ev;
struct tevent_req *req;
NTSTATUS cli_set_unix_extensions_capabilities_recv(struct tevent_req *req);
NTSTATUS cli_set_unix_extensions_capabilities(struct cli_state *cli,
uint16_t major, uint16_t minor,
- uint32_t caplow, uint32 caphigh);
+ uint32_t caplow, uint32_t caphigh);
struct tevent_req *cli_get_fs_attr_info_send(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
struct cli_state *cli);
uint32_t flags);
void notify_job_status(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32_t jobid, uint32 status);
+ const char *sharename, uint32_t jobid, uint32_t status);
void notify_job_total_bytes(struct tevent_context *ev,
struct messaging_context *msg_ctx,
const char *sharename, uint32_t jobid,
}
t = gmtime(&now);
- mins = (uint32_t)t->tm_hour*60 + (uint32)t->tm_min;
+ mins = (uint32_t)t->tm_hour*60 + (uint32_t)t->tm_min;
if (mins >= pinfo2->starttime && mins <= pinfo2->untiltime) {
ok = True;
DEBUG(1,("INFO: Received REQ_PROFILELEVEL message from PID %u\n",
(unsigned int)procid_to_pid(&src)));
messaging_send_buf(msg_ctx, src, MSG_PROFILELEVEL,
- (uint8 *)&level, sizeof(level));
+ (uint8_t *)&level, sizeof(level));
}
/*******************************************************************
Stream a uint16.
********************************************************************/
-bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16)
+bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16_t *data16)
{
char *q = prs_mem_get(ps, sizeof(uint16_t));
if (q == NULL)
bool prs_align_uint64(prs_struct *ps);
char *prs_mem_get(prs_struct *ps, uint32_t extra_size);
void prs_switch_type(prs_struct *ps, bool io);
-bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16 *data16);
+bool prs_uint16(const char *name, prs_struct *ps, int depth, uint16_t *data16);
bool prs_uint32(const char *name, prs_struct *ps, int depth, uint32_t *data32);
bool prs_uint64(const char *name, prs_struct *ps, int depth, uint64 *data64);
bool prs_uint8s(bool charmode, const char *name, prs_struct *ps, int depth, uint8_t *data8s, int len);
prs_debug(ps, depth, desc, "prs_regf_block");
depth++;
- if ( !prs_uint8s( True, "header", ps, depth, (uint8*)file->header, sizeof( file->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8_t *)file->header, sizeof( file->header )) )
return False;
/* yes, these values are always identical so store them only once */
prs_debug(ps, depth, desc, "prs_regf_block");
depth++;
- if ( !prs_uint8s( True, "header", ps, depth, (uint8*)hbin->header, sizeof( hbin->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8_t*)hbin->header, sizeof( hbin->header )) )
return False;
if ( !prs_uint32( "first_hbin_off", ps, depth, &hbin->first_hbin_off ))
if ( !prs_uint32( "rec_size", ps, depth, &nk->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", ps, depth, (uint8*)nk->header, sizeof( nk->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8_t *)nk->header, sizeof( nk->header )) )
return False;
if ( !prs_uint16( "key_type", ps, depth, &nk->key_type ))
return False;
}
- if ( !prs_uint8s( True, "name", ps, depth, (uint8*)nk->keyname, name_length) )
+ if ( !prs_uint8s( True, "name", ps, depth, (uint8_t *)nk->keyname, name_length) )
return False;
if ( UNMARSHALLING(ps) )
if ( !prs_uint32( "rec_size", &hbin->ps, depth, &lf->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", &hbin->ps, depth, (uint8*)lf->header, sizeof( lf->header )) )
+ if ( !prs_uint8s( True, "header", &hbin->ps, depth, (uint8_t *)lf->header, sizeof( lf->header )) )
return False;
if ( !prs_uint16( "num_keys", &hbin->ps, depth, &lf->num_keys))
if ( !prs_uint32( "rec_size", &hbin->ps, depth, &sk->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", ps, depth, (uint8*)sk->header, sizeof( sk->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8_t *)sk->header, sizeof( sk->header )) )
return False;
if ( !prs_uint16( "tag", ps, depth, &tag))
return False;
if ( !prs_uint32( "rec_size", &hbin->ps, depth, &vk->rec_size ))
return False;
- if ( !prs_uint8s( True, "header", ps, depth, (uint8*)vk->header, sizeof( vk->header )) )
+ if ( !prs_uint8s( True, "header", ps, depth, (uint8_t *)vk->header, sizeof( vk->header )) )
return False;
if ( MARSHALLING(&hbin->ps) )
if ( !(vk->valuename = PRS_ALLOC_MEM( ps, char, name_length+1 )))
return False;
}
- if ( !prs_uint8s( True, "name", ps, depth, (uint8*)vk->valuename, name_length ) )
+ if ( !prs_uint8s( True, "name", ps, depth, (uint8_t *)vk->valuename, name_length ) )
return False;
}
if (c->opt_rid == 0) {
if ( pdb_capabilities() & PDB_CAP_STORE_RIDS ) {
- if ( !pdb_new_rid((uint32*)&c->opt_rid) ) {
+ if ( !pdb_new_rid((uint32_t *)&c->opt_rid) ) {
d_fprintf( stderr,
_("Could not allocate new RID\n"));
TALLOC_FREE(map);
static void list_sessions_func(char *wsname, char *username, uint16_t conns,
uint16_t opens, uint16_t users, uint32_t sess_time,
- uint32_t idle_time, uint32 user_flags, char *clitype)
+ uint32_t idle_time, uint32_t user_flags, char *clitype)
{
int hrs = idle_time / 3600;
int min = (idle_time / 60) % 60;
}
static void display_session_func(const char *wsname, const char *username,
- uint16_t conns, uint16_t opens, uint16 users,
- uint32_t sess_time, uint32 idle_time,
+ uint16_t conns, uint16_t opens, uint16_t users,
+ uint32_t sess_time, uint32_t idle_time,
uint32_t user_flags, const char *clitype)
{
int ihrs = idle_time / 3600;
shrs, smin, ssec, ihrs, imin, isec);
}
-static void display_conns_func(uint16_t conn_id, uint16_t conn_type, uint16 opens,
+static void display_conns_func(uint16_t conn_id, uint16_t conn_type, uint16_t opens,
uint16_t users, uint32_t conn_time,
const char *username, const char *netname)
{
NTSTATUS wcache_lookup_useraliases(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
uint32_t num_sids, const struct dom_sid *sids,
- uint32_t *pnum_aliases, uint32 **paliases);
+ uint32_t *pnum_aliases, uint32_t **paliases);
NTSTATUS wcache_lookup_usergroups(struct winbindd_domain *domain,
TALLOC_CTX *mem_ctx,
const struct dom_sid *user_sid,