/* The following definitions come from printing/printing.c */
-uint32 sysjob_to_jobid_pdb(struct tdb_print_db *pdb, int sysjob);
-uint32 sysjob_to_jobid(int unix_jobid);
+uint32_t sysjob_to_jobid_pdb(struct tdb_print_db *pdb, int sysjob);
+uint32_t sysjob_to_jobid(int unix_jobid);
int jobid_to_sysjob_pdb(struct tdb_print_db *pdb, uint32_t jobid);
bool print_notify_register_pid(int snum);
bool print_notify_deregister_pid(int snum);
-bool print_job_exists(const char* sharename, uint32 jobid);
+bool print_job_exists(const char* sharename, uint32_t jobid);
struct spoolss_DeviceMode *print_job_devmode(TALLOC_CTX *mem_ctx,
const char *sharename,
- uint32 jobid);
+ uint32_t jobid);
bool print_job_set_name(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid, const char *name);
+ const char *sharename, uint32_t jobid, const char *name);
bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t jobid, char **name);
WERROR print_job_delete(const struct auth_session_info *server_info,
struct messaging_context *msg_ctx,
int snum, uint32_t jobid);
WERROR print_job_pause(const struct auth_session_info *server_info,
struct messaging_context *msg_ctx,
- int snum, uint32 jobid);
+ int snum, uint32_t jobid);
WERROR print_job_resume(const struct auth_session_info *server_info,
struct messaging_context *msg_ctx,
- int snum, uint32 jobid);
+ int snum, uint32_t jobid);
ssize_t print_job_write(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- int snum, uint32 jobid, const char *buf, size_t size);
+ int snum, uint32_t jobid, const char *buf, size_t size);
int print_queue_length(struct messaging_context *msg_ctx, int snum,
print_status_struct *pstatus);
WERROR print_job_start(const struct auth_session_info *server_info,
int snum, const char *docname, const char *filename,
struct spoolss_DeviceMode *devmode, uint32_t *_jobid);
void print_job_endpage(struct messaging_context *msg_ctx,
- int snum, uint32 jobid);
+ int snum, uint32_t jobid);
NTSTATUS print_job_end(struct messaging_context *msg_ctx, int snum,
- uint32 jobid, enum file_close_type close_type);
+ uint32_t jobid, enum file_close_type close_type);
int print_queue_status(struct messaging_context *msg_ctx, int snum,
print_queue_struct **ppqueue,
print_status_struct *status);
struct messaging_context *msg_ctx, int snum);
WERROR print_queue_purge(const struct auth_session_info *server_info,
struct messaging_context *msg_ctx, int snum);
-uint16 pjobid_to_rap(const char* sharename, uint32 jobid);
-bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid);
-void rap_jobid_delete(const char* sharename, uint32 jobid);
+uint16_t pjobid_to_rap(const char* sharename, uint32_t jobid);
+bool rap_to_pjobid(uint16_t rap_jobid, fstring sharename, uint32_t *pjobid);
+void rap_jobid_delete(const char* sharename, uint32_t jobid);
bool print_backend_init(struct messaging_context *msg_ctx);
void printing_end(void);
struct notify_queue *next, *prev;
struct spoolss_notify_msg *msg;
struct timeval tv;
- uint8 *buf;
+ uint8_t *buf;
size_t buflen;
} *notify_queue_head = NULL;
static bool flatten_message(struct notify_queue *q)
{
struct spoolss_notify_msg *msg = q->msg;
- uint8 *buf = NULL;
+ uint8_t *buf = NULL;
size_t buflen = 0, len;
again:
msg->len, msg->notify.data);
if (buflen != len) {
- buf = (uint8 *)TALLOC_REALLOC(send_ctx, buf, len);
+ buf = (uint8_t *)TALLOC_REALLOC(send_ctx, buf, len);
if (!buf)
return False;
buflen = len;
messaging_send_buf(msg_ctx,
pid_to_procid(pid_list[i]),
MSG_PRINTER_NOTIFY2 | MSG_FLAG_LOWPRIORITY,
- (uint8 *)buf, offset);
+ (uint8_t *)buf, offset);
if ((timeout != 0) && timeval_expired(&end_time)) {
break;
static void send_notify_field_values(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 type,
- uint32 field, uint32 id, uint32 value1,
- uint32 value2, uint32 flags)
+ const char *sharename, uint32_t type,
+ uint32_t field, uint32_t id, uint32_t value1,
+ uint32_t value2, uint32_t flags)
{
struct spoolss_notify_msg *msg;
static void send_notify_field_buffer(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 type,
- uint32 field, uint32 id, uint32 len,
+ const char *sharename, uint32_t type,
+ uint32_t field, uint32_t id, uint32_t len,
const char *buffer)
{
struct spoolss_notify_msg *msg;
void notify_printer_status_byname(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 status)
+ const char *sharename, uint32_t status)
{
/* Printer status stored in value1 */
void notify_printer_status(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- int snum, uint32 status)
+ int snum, uint32_t status)
{
const char *sharename = lp_servicename(talloc_tos(), snum);
void notify_job_status_byname(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid,
- uint32 status,
- uint32 flags)
+ const char *sharename, uint32_t jobid,
+ uint32_t status,
+ uint32_t flags)
{
/* Job id stored in id field, status in value1 */
void notify_job_status(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid, uint32 status)
+ const char *sharename, uint32_t jobid, uint32_t status)
{
notify_job_status_byname(ev, msg_ctx, sharename, jobid, status, 0);
}
void notify_job_total_bytes(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid,
- uint32 size)
+ const char *sharename, uint32_t jobid,
+ uint32_t size)
{
/* Job id stored in id field, status in value1 */
void notify_job_total_pages(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid,
- uint32 pages)
+ const char *sharename, uint32_t jobid,
+ uint32_t pages)
{
/* Job id stored in id field, status in value1 */
void notify_job_username(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid, char *name)
+ const char *sharename, uint32_t jobid, char *name)
{
send_notify_field_buffer(
ev, msg_ctx,
void notify_job_name(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid, char *name)
+ const char *sharename, uint32_t jobid, char *name)
{
send_notify_field_buffer(
ev, msg_ctx,
void notify_job_submitted(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid,
+ const char *sharename, uint32_t jobid,
time_t submitted)
{
send_notify_field_buffer(
void notify_printer_byname(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *printername, uint32 change,
+ const char *printername, uint32_t change,
const char *value)
{
int snum = print_queue_snum(printername);
returns -1 on error, 1 on version info found, and 0 on no version info found.
****************************************************************************/
-static int get_file_version(files_struct *fsp, char *fname,uint32 *major, uint32 *minor)
+static int get_file_version(files_struct *fsp, char *fname,uint32_t *major, uint32_t *minor)
{
int i;
char *buf = NULL;
{
bool use_version = true;
- uint32 new_major;
- uint32 new_minor;
+ uint32_t new_major;
+ uint32_t new_minor;
time_t new_create_time;
- uint32 old_major;
- uint32 old_minor;
+ uint32_t old_major;
+ uint32_t old_minor;
time_t old_create_time;
struct smb_filename *smb_fname = NULL;
/****************************************************************************
Determine the correct cVersion associated with an architecture and driver
****************************************************************************/
-static uint32 get_correct_cversion(struct auth_session_info *session_info,
+static uint32_t get_correct_cversion(struct auth_session_info *session_info,
const char *architecture,
const char *driverpath_in,
WERROR *perr)
*perr = WERR_ACCESS_DENIED;
goto error_exit;
} else {
- uint32 major;
- uint32 minor;
+ uint32_t major;
+ uint32_t minor;
int ret;
ret = get_file_version(fsp, smb_fname->base_name, &major, &minor);
struct spoolss_DriverInfo8 *info)
{
int i;
- uint32 version;
+ uint32_t version;
struct spoolss_DriverInfo8 *driver;
bool in_use = false;
uint32_t num_drivers;
int access_type)
{
struct spoolss_security_descriptor *secdesc = NULL;
- uint32 access_granted;
+ uint32_t access_granted;
size_t sd_size;
NTSTATUS status;
WERROR result;
bool ok = False;
time_t now = time(NULL);
struct tm *t;
- uint32 mins;
+ uint32_t mins;
result = winreg_get_printer_internal(NULL, session_info, msg_ctx,
servicename, &pinfo2);
extern userdom_struct current_user_info;
/* Current printer interface */
-static bool remove_from_jobs_added(const char* sharename, uint32 jobid);
+static bool remove_from_jobs_added(const char* sharename, uint32_t jobid);
/*
the printing backend revolves around a tdb database that stores the
*/
static TDB_CONTEXT *rap_tdb;
-static uint16 next_rap_jobid;
+static uint16_t next_rap_jobid;
struct rap_jobid_key {
fstring sharename;
- uint32 jobid;
+ uint32_t jobid;
};
/***************************************************************************
bit RPC jobids.... JRA.
***************************************************************************/
-uint16 pjobid_to_rap(const char* sharename, uint32 jobid)
+uint16_t pjobid_to_rap(const char* sharename, uint32_t jobid)
{
- uint16 rap_jobid;
+ uint16_t rap_jobid;
TDB_DATA data, key;
struct rap_jobid_key jinfo;
- uint8 buf[2];
+ uint8_t buf[2];
DEBUG(10,("pjobid_to_rap: called.\n"));
ZERO_STRUCT( jinfo );
fstrcpy( jinfo.sharename, sharename );
jinfo.jobid = jobid;
- key.dptr = (uint8 *)&jinfo;
+ key.dptr = (uint8_t *)&jinfo;
key.dsize = sizeof(jinfo);
data = tdb_fetch(rap_tdb, key);
return rap_jobid;
}
-bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid)
+bool rap_to_pjobid(uint16_t rap_jobid, fstring sharename, uint32_t *pjobid)
{
TDB_DATA data, key;
- uint8 buf[2];
+ uint8_t buf[2];
DEBUG(10,("rap_to_pjobid called.\n"));
return False;
}
-void rap_jobid_delete(const char* sharename, uint32 jobid)
+void rap_jobid_delete(const char* sharename, uint32_t jobid)
{
TDB_DATA key, data;
- uint16 rap_jobid;
+ uint16_t rap_jobid;
struct rap_jobid_key jinfo;
- uint8 buf[2];
+ uint8_t buf[2];
DEBUG(10,("rap_jobid_delete: called.\n"));
ZERO_STRUCT( jinfo );
fstrcpy( jinfo.sharename, sharename );
jinfo.jobid = jobid;
- key.dptr = (uint8 *)&jinfo;
+ key.dptr = (uint8_t *)&jinfo;
key.dsize = sizeof(jinfo);
data = tdb_fetch(rap_tdb, key);
Useful function to generate a tdb key.
****************************************************************************/
-static TDB_DATA print_key(uint32 jobid, uint32 *tmp)
+static TDB_DATA print_key(uint32_t jobid, uint32_t *tmp)
{
TDB_DATA ret;
SIVAL(tmp, 0, jobid);
- ret.dptr = (uint8 *)tmp;
+ ret.dptr = (uint8_t *)tmp;
ret.dsize = sizeof(*tmp);
return ret;
}
/****************************************************************************
Pack the devicemode to store it in a tdb.
****************************************************************************/
-static int pack_devicemode(struct spoolss_DeviceMode *devmode, uint8 *buf, int buflen)
+static int pack_devicemode(struct spoolss_DeviceMode *devmode, uint8_t *buf, int buflen)
{
enum ndr_err_code ndr_err;
DATA_BLOB blob;
Unpack the devicemode to store it in a tdb.
****************************************************************************/
static int unpack_devicemode(TALLOC_CTX *mem_ctx,
- const uint8 *buf, int buflen,
+ const uint8_t *buf, int buflen,
struct spoolss_DeviceMode **devmode)
{
struct spoolss_DeviceMode *dm;
unpack a pjob from a tdb buffer
***********************************************************************/
-static int unpack_pjob(TALLOC_CTX *mem_ctx, uint8 *buf, int buflen,
+static int unpack_pjob(TALLOC_CTX *mem_ctx, uint8_t *buf, int buflen,
struct printjob *pjob)
{
int len = 0;
int used;
- uint32 pjpid, pjjobid, pjsysjob, pjfd, pjstarttime, pjstatus;
- uint32 pjsize, pjpage_count, pjspooled, pjsmbjob;
+ uint32_t pjpid, pjjobid, pjsysjob, pjfd, pjstarttime, pjstatus;
+ uint32_t pjsize, pjpage_count, pjspooled, pjsmbjob;
if (!buf || !pjob) {
return -1;
static struct printjob *print_job_find(TALLOC_CTX *mem_ctx,
const char *sharename,
- uint32 jobid)
+ uint32_t jobid)
{
struct printjob *pjob;
uint32_t tmp;
return 0;
}
-uint32 sysjob_to_jobid_pdb(struct tdb_print_db *pdb, int sysjob)
+uint32_t sysjob_to_jobid_pdb(struct tdb_print_db *pdb, int sysjob)
{
struct job_traverse_state state;
current printer tdb's. Don't do this often ! JRA.
****************************************************************************/
-uint32 sysjob_to_jobid(int unix_jobid)
+uint32_t sysjob_to_jobid(int unix_jobid)
{
int services = lp_numservices();
int snum;
/* Convert a lpq status value stored in printing.tdb into the
appropriate win32 API constant. */
-static uint32 map_to_spoolss_status(uint32 lpq_status)
+static uint32_t map_to_spoolss_status(uint32_t lpq_status)
{
int i = 0;
uint32_t store_jobid;
SIVAL(&store_jobid, 0, jobid);
- data.dptr = (uint8 *) &store_jobid;
+ data.dptr = (uint8_t *) &store_jobid;
data.dsize = 4;
DEBUG(10,("add_to_jobs_added: Added jobid %u\n", (unsigned int)jobid ));
job_count = data.dsize / 4;
for (i = 0; i < job_count; i++) {
- uint32 ch_jobid;
+ uint32_t ch_jobid;
ch_jobid = IVAL(data.dptr, i*4);
if (ch_jobid == jobid) {
static void pjob_store_notify(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char* sharename, uint32 jobid,
+ const char* sharename, uint32_t jobid,
struct printjob *old_data,
struct printjob *new_data,
bool *pchanged)
static bool pjob_store(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char* sharename, uint32 jobid,
+ const char* sharename, uint32_t jobid,
struct printjob *pjob)
{
uint32_t tmp;
len += pack_devicemode(pjob->devmode, buf+len, buflen-len);
if (buflen != len) {
- buf = (uint8 *)SMB_REALLOC(buf, len);
+ buf = (uint8_t *)SMB_REALLOC(buf, len);
if (!buf) {
DEBUG(0,("pjob_store: failed to enlarge buffer!\n"));
goto done;
static void pjob_delete(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char* sharename, uint32 jobid)
+ const char* sharename, uint32_t jobid)
{
uint32_t tmp;
struct printjob *pjob;
- uint32 job_status = 0;
+ uint32_t job_status = 0;
struct tdb_print_db *pdb;
TALLOC_CTX *tmp_ctx = talloc_new(ev);
if (tmp_ctx == NULL) {
static void print_unix_job(struct tevent_context *ev,
struct messaging_context *msg_ctx,
const char *sharename, print_queue_struct *q,
- uint32 jobid)
+ uint32_t jobid)
{
struct printjob pj, *old_pj;
TALLOC_CTX *tmp_ctx = talloc_new(ev);
{
struct traverse_struct *ts = (struct traverse_struct *)state;
struct printjob pjob;
- uint32 jobid;
+ uint32_t jobid;
int i = 0;
if ( key.dsize != sizeof(jobid) )
TDB_DATA key;
TDB_DATA data;
pid_t updating_pid = getpid();
- uint8 buffer[4];
+ uint8_t buffer[4];
struct tdb_print_db *pdb = get_print_db_byname(sharename);
queue[i].fs_file);
}
- if ((data.dptr = (uint8 *)SMB_MALLOC(data.dsize)) == NULL)
+ if ((data.dptr = (uint8_t *)SMB_MALLOC(data.dsize)) == NULL)
return;
len = 0;
return data;
}
-static void check_job_added(const char *sharename, TDB_DATA data, uint32 jobid)
+static void check_job_added(const char *sharename, TDB_DATA data, uint32_t jobid)
{
unsigned int i;
unsigned int job_count = data.dsize / 4;
for (i = 0; i < job_count; i++) {
- uint32 ch_jobid;
+ uint32_t ch_jobid;
ch_jobid = IVAL(data.dptr, i*4);
if (ch_jobid == jobid)
|| (time_now - last_qscan_time) >= lp_lpq_cache_time()
|| last_qscan_time > (time_now + MAX_CACHE_VALID_TIME))
{
- uint32 u;
+ uint32_t u;
time_t msg_pending_time;
DEBUG(4, ("print_cache_expired: cache expired for queue %s "
jcdata = get_jobs_added_data(pdb);
for (i=0; i<qcount; i++) {
- uint32 jobid = sysjob_to_jobid_pdb(pdb, queue[i].sysjob);
+ uint32_t jobid = sysjob_to_jobid_pdb(pdb, queue[i].sysjob);
if (jobid == (uint32)-1) {
/* assume its a unix print job */
print_unix_job(ev, msg_ctx,
key = string_tdb_data(keystr);
status.qcount = qcount;
- data.dptr = (uint8 *)&status;
+ data.dptr = (uint8_t *)&status;
data.dsize = sizeof(status);
tdb_store(pdb->tdb, key, data, TDB_REPLACE);
int printing_type;
size_t len;
- len = tdb_unpack( (uint8 *)data->data, data->length, "fdPP",
+ len = tdb_unpack( (uint8_t *)data->data, data->length, "fdPP",
sharename,
&printing_type,
&lpqcommand,
fstring sharename;
char *lpqcommand = NULL;
char *lprmcommand = NULL;
- uint8 *buffer = NULL;
+ uint8_t *buffer = NULL;
size_t len = 0;
size_t newlen;
struct tdb_print_db *pdb;
/* finally send the message */
messaging_send_buf(msg_ctx, pid_to_procid(background_lpq_updater_pid),
- MSG_PRINTER_UPDATE, (uint8 *)buffer, len);
+ MSG_PRINTER_UPDATE, (uint8_t *)buffer, len);
SAFE_FREE( buffer );
for (i = 0; i < data.dsize; i += 8) {
if (IVAL(data.dptr,i) == mypid) {
- uint32 new_refcount = IVAL(data.dptr, i+4) + 1;
+ uint32_t new_refcount = IVAL(data.dptr, i+4) + 1;
SIVAL(data.dptr, i+4, new_refcount);
break;
}
if (i == data.dsize) {
/* We weren't in the list. Realloc. */
- data.dptr = (uint8 *)SMB_REALLOC(data.dptr, data.dsize + 8);
+ data.dptr = (uint8_t *)SMB_REALLOC(data.dptr, data.dsize + 8);
if (!data.dptr) {
DEBUG(0,("print_notify_register_pid: Relloc fail for printer %s\n",
printername));
for (i = 0; i < data.dsize; ) {
if (IVAL(data.dptr,i) == mypid) {
- uint32 refcount = IVAL(data.dptr, i+4);
+ uint32_t refcount = IVAL(data.dptr, i+4);
refcount--;
Check if a jobid is valid. It is valid if it exists in the database.
****************************************************************************/
-bool print_job_exists(const char* sharename, uint32 jobid)
+bool print_job_exists(const char* sharename, uint32_t jobid)
{
struct tdb_print_db *pdb = get_print_db_byname(sharename);
bool ret;
struct spoolss_DeviceMode *print_job_devmode(TALLOC_CTX *mem_ctx,
const char *sharename,
- uint32 jobid)
+ uint32_t jobid)
{
struct printjob *pjob = print_job_find(mem_ctx, sharename, jobid);
if (pjob == NULL) {
bool print_job_set_name(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- const char *sharename, uint32 jobid, const char *name)
+ const char *sharename, uint32_t jobid, const char *name)
{
struct printjob *pjob;
bool ret;
Remove a jobid from the 'jobs added' list.
***************************************************************************/
-static bool remove_from_jobs_added(const char* sharename, uint32 jobid)
+static bool remove_from_jobs_added(const char* sharename, uint32_t jobid)
{
struct tdb_print_db *pdb = get_print_db_byname(sharename);
TDB_DATA data, key;
job_count = data.dsize / 4;
for (i = 0; i < job_count; i++) {
- uint32 ch_jobid;
+ uint32_t ch_jobid;
ch_jobid = IVAL(data.dptr, i*4);
if (ch_jobid == jobid) {
static bool print_job_delete1(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- int snum, uint32 jobid)
+ int snum, uint32_t jobid)
{
const char* sharename = lp_const_servicename(snum);
struct printjob *pjob;
static bool is_owner(const struct auth_session_info *server_info,
const char *servicename,
- uint32 jobid)
+ uint32_t jobid)
{
struct printjob *pjob;
bool ret;
WERROR print_job_pause(const struct auth_session_info *server_info,
struct messaging_context *msg_ctx,
- int snum, uint32 jobid)
+ int snum, uint32_t jobid)
{
const char* sharename = lp_const_servicename(snum);
struct printjob *pjob;
WERROR print_job_resume(const struct auth_session_info *server_info,
struct messaging_context *msg_ctx,
- int snum, uint32 jobid)
+ int snum, uint32_t jobid)
{
const char *sharename = lp_const_servicename(snum);
struct printjob *pjob;
ssize_t print_job_write(struct tevent_context *ev,
struct messaging_context *msg_ctx,
- int snum, uint32 jobid, const char *buf, size_t size)
+ int snum, uint32_t jobid, const char *buf, size_t size)
{
const char* sharename = lp_const_servicename(snum);
ssize_t return_code;
***************************************************************************/
static WERROR allocate_print_jobid(struct tdb_print_db *pdb, int snum,
- const char *sharename, uint32 *pjobid)
+ const char *sharename, uint32_t *pjobid)
{
int i;
- uint32 jobid;
+ uint32_t jobid;
enum TDB_ERROR terr;
int ret;
Append a jobid to the 'jobs added' list.
***************************************************************************/
-static bool add_to_jobs_added(struct tdb_print_db *pdb, uint32 jobid)
+static bool add_to_jobs_added(struct tdb_print_db *pdb, uint32_t jobid)
{
TDB_DATA data;
- uint32 store_jobid;
+ uint32_t store_jobid;
SIVAL(&store_jobid, 0, jobid);
- data.dptr = (uint8 *)&store_jobid;
+ data.dptr = (uint8_t *)&store_jobid;
data.dsize = 4;
DEBUG(10,("add_to_jobs_added: Added jobid %u\n", (unsigned int)jobid ));
****************************************************************************/
void print_job_endpage(struct messaging_context *msg_ctx,
- int snum, uint32 jobid)
+ int snum, uint32_t jobid)
{
const char* sharename = lp_const_servicename(snum);
struct printjob *pjob;
****************************************************************************/
NTSTATUS print_job_end(struct messaging_context *msg_ctx, int snum,
- uint32 jobid, enum file_close_type close_type)
+ uint32_t jobid, enum file_close_type close_type)
{
const char* sharename = lp_const_servicename(snum);
struct printjob *pjob;
{
TDB_DATA data, cgdata, jcdata;
print_queue_struct *queue = NULL;
- uint32 qcount = 0;
- uint32 extra_count = 0;
+ uint32_t qcount = 0;
+ uint32_t extra_count = 0;
uint32_t changed_count = 0;
int total_count = 0;
size_t len = 0;
- uint32 i;
+ uint32_t i;
int max_reported_jobs = lp_max_reported_print_jobs(snum);
bool ret = false;
const char* sharename = lp_servicename(talloc_tos(), snum);
/* Retrieve the linearised queue data. */
for(i = 0; i < qcount; i++) {
- uint32 qjob, qsize, qpage_count, qstatus, qpriority, qtime;
+ uint32_t qjob, qsize, qpage_count, qstatus, qpriority, qtime;
len += tdb_unpack(data.dptr + len, data.dsize - len, "ddddddff",
&qjob,
&qsize,
/* Add new jobids to the queue. */
for (i = 0; i < extra_count; i++) {
- uint32 jobid;
+ uint32_t jobid;
struct printjob *pjob;
jobid = IVAL(cgdata.dptr, i*4);
struct srv_info_struct {
fstring name;
- uint32 type;
+ uint32_t type;
fstring comment;
fstring domain;
bool server_added;
number of entries.
******************************************************************/
-static int get_session_info(uint32 servertype,
+static int get_session_info(uint32_t servertype,
struct srv_info_struct **servers,
const char *domain)
{
char *p = skip_string(param,tpscnt,str2);
int uLevel = get_safe_SVAL(param, tpscnt, p, 0, -1);
int buf_len = get_safe_SVAL(param,tpscnt, p, 2, 0);
- uint32 servertype = get_safe_IVAL(param,tpscnt,p,4, 0);
+ uint32_t servertype = get_safe_IVAL(param,tpscnt,p,4, 0);
char *p2;
int data_len, fixed_len, string_len;
int f_len = 0, s_len = 0;
char *p = skip_string(param,tpscnt,str2);
int uLevel = get_safe_SVAL(param, tpscnt, p, 0, -1);
int buf_len = get_safe_SVAL(param,tpscnt, p, 2, 0);
- uint32 servertype = get_safe_IVAL(param,tpscnt,p,4, 0);
+ uint32_t servertype = get_safe_IVAL(param,tpscnt,p,4, 0);
char *p2;
int data_len, fixed_len, string_len;
int f_len = 0, s_len = 0;
char *str1 = get_safe_str_ptr(param,tpscnt,param,2);
char *str2 = skip_string(param,tpscnt,str1);
char *p = skip_string(param,tpscnt,str2);
- uint32 jobid;
+ uint32_t jobid;
fstring sharename;
int errcode;
WERROR werr = WERR_OK;
char *str1 = get_safe_str_ptr(param,tpscnt,param,2);
char *str2 = skip_string(param,tpscnt,str1);
char *p = skip_string(param,tpscnt,str2);
- uint32 jobid;
+ uint32_t jobid;
fstring sharename;
int uLevel = get_safe_SVAL(param,tpscnt,p,2,-1);
int function = get_safe_SVAL(param,tpscnt,p,4,-1);
char *p = skip_string(param,tpscnt,str2);
int uLevel;
fstring sharename;
- uint32 jobid;
+ uint32_t jobid;
struct pack_desc desc;
char *tmpdata=NULL;
const char *parent_dir,
int flags,
mode_t unx_mode,
- uint32 access_mask, /* client requested access mask. */
- uint32 open_access_mask, /* what we're actually using in the open. */
+ uint32_t access_mask, /* client requested access mask. */
+ uint32_t open_access_mask, /* what we're actually using in the open. */
bool *p_file_created)
{
struct smb_filename *smb_fname = fsp->fsp_name;
****************************************************************************/
static bool share_conflict(struct share_mode_entry *entry,
- uint32 access_mask,
- uint32 share_access)
+ uint32_t access_mask,
+ uint32_t share_access)
{
DEBUG(10,("share_conflict: entry->access_mask = 0x%x, "
"entry->share_access = 0x%x, "
}
#endif
-bool is_stat_open(uint32 access_mask)
+bool is_stat_open(uint32_t access_mask)
{
const uint32_t stat_open_bits =
(SYNCHRONIZE_ACCESS|
static NTSTATUS open_mode_check(connection_struct *conn,
struct share_mode_lock *lck,
- uint32 access_mask,
- uint32 share_access)
+ uint32_t access_mask,
+ uint32_t share_access)
{
int i;
/* Overload entry->op_type */
/*
- * This is a cut from uint32 to uint16, but so far only the lower 3
+ * This is a cut from uint32_t to uint16, but so far only the lower 3
* bits (LEASE_WRITE/HANDLE/READ are used anyway.
*/
SSVAL(msg,OP_BREAK_MSG_OP_TYPE_OFFSET, break_to);
status = messaging_send_buf(msg_ctx, exclusive->pid,
MSG_SMB_BREAK_REQUEST,
- (uint8 *)msg, sizeof(msg));
+ (uint8_t *)msg, sizeof(msg));
if (!NT_STATUS_IS_OK(status)) {
DEBUG(3, ("Could not send oplock break message: %s\n",
nt_errstr(status)));
****************************************************************************/
static bool open_match_attributes(connection_struct *conn,
- uint32 old_dos_attr,
- uint32 new_dos_attr,
+ uint32_t old_dos_attr,
+ uint32_t new_dos_attr,
mode_t existing_unx_mode,
mode_t new_unx_mode,
mode_t *returned_unx_mode)
{
- uint32 noarch_old_dos_attr, noarch_new_dos_attr;
+ uint32_t noarch_old_dos_attr, noarch_new_dos_attr;
noarch_old_dos_attr = (old_dos_attr & ~FILE_ATTRIBUTE_ARCHIVE);
noarch_new_dos_attr = (new_dos_attr & ~FILE_ATTRIBUTE_ARCHIVE);
files_struct *fsp_to_dup_into,
const struct smb_filename *smb_fname,
struct file_id id,
- uint16 file_pid,
+ uint16_t file_pid,
uint64_t vuid,
- uint32 access_mask,
- uint32 share_access,
- uint32 create_options)
+ uint32_t access_mask,
+ uint32_t share_access,
+ uint32_t create_options)
{
files_struct *fsp;
static NTSTATUS open_file_ntcreate(connection_struct *conn,
struct smb_request *req,
- uint32 access_mask, /* access bits (FILE_READ_DATA etc.) */
- uint32 share_access, /* share constants (FILE_SHARE_READ etc) */
- uint32 create_disposition, /* FILE_OPEN_IF etc. */
- uint32 create_options, /* options such as delete on close. */
- uint32 new_dos_attributes, /* attributes used for new file. */
+ uint32_t access_mask, /* access bits (FILE_READ_DATA etc.) */
+ uint32_t share_access, /* share constants (FILE_SHARE_READ etc) */
+ uint32_t create_disposition, /* FILE_OPEN_IF etc. */
+ uint32_t create_options, /* options such as delete on close. */
+ uint32_t new_dos_attributes, /* attributes used for new file. */
int oplock_request, /* internal Samba oplock codes. */
struct smb2_lease *lease,
/* Information (FILE_EXISTS etc.) */
mode_t new_unx_mode = (mode_t)0;
mode_t unx_mode = (mode_t)0;
int info;
- uint32 existing_dos_attributes = 0;
+ uint32_t existing_dos_attributes = 0;
struct timeval request_time = timeval_zero();
struct share_mode_lock *lck = NULL;
- uint32 open_access_mask = access_mask;
+ uint32_t open_access_mask = access_mask;
NTSTATUS status;
char *parent_dir;
SMB_STRUCT_STAT saved_stat = smb_fname->st;
}
if (!NT_STATUS_IS_OK(status)) {
- uint32 can_access_mask;
+ uint32_t can_access_mask;
bool can_access = True;
SMB_ASSERT(NT_STATUS_EQUAL(status, NT_STATUS_SHARING_VIOLATION));
static NTSTATUS mkdir_internal(connection_struct *conn,
struct smb_filename *smb_dname,
- uint32 file_attributes)
+ uint32_t file_attributes)
{
mode_t mode;
char *parent_dir = NULL;
static NTSTATUS open_directory(connection_struct *conn,
struct smb_request *req,
struct smb_filename *smb_dname,
- uint32 access_mask,
- uint32 share_access,
- uint32 create_disposition,
- uint32 create_options,
- uint32 file_attributes,
+ uint32_t access_mask,
+ uint32_t share_access,
+ uint32_t create_disposition,
+ uint32_t create_options,
+ uint32_t file_attributes,
int *pinfo,
files_struct **result)
{
if ((conn->fs_capabilities & FILE_NAMED_STREAMS)
&& is_ntfs_stream_smb_fname(smb_fname)
&& (!(private_flags & NTCREATEX_OPTIONS_PRIVATE_STREAM_DELETE))) {
- uint32 base_create_disposition;
+ uint32_t base_create_disposition;
struct smb_filename *smb_fname_base = NULL;
if (create_options & FILE_DIRECTORY_FILE) {
size_t srvstr_get_path_wcard(TALLOC_CTX *ctx,
const char *base_ptr,
- uint16 smb_flags2,
+ uint16_t smb_flags2,
char **pp_dest,
const char *src,
size_t src_len,
size_t srvstr_get_path(TALLOC_CTX *ctx,
const char *base_ptr,
- uint16 smb_flags2,
+ uint16_t smb_flags2,
char **pp_dest,
const char *src,
size_t src_len,
if (tcon_flags & TCONX_FLAG_EXTENDED_RESPONSE) {
/* Return permissions. */
- uint32 perm1 = 0;
- uint32 perm2 = 0;
+ uint32_t perm1 = 0;
+ uint32_t perm2 = 0;
reply_outbuf(req, 7, 0);
Reply to an unknown type.
****************************************************************************/
-void reply_unknown_new(struct smb_request *req, uint8 type)
+void reply_unknown_new(struct smb_request *req, uint8_t type)
{
DEBUG(0, ("unknown command type (%s): type=%d (0x%X)\n",
smb_fn_name(type), type, type));
void reply_ioctl(struct smb_request *req)
{
connection_struct *conn = req->conn;
- uint16 device;
- uint16 function;
- uint32 ioctl_code;
+ uint16_t device;
+ uint16_t function;
+ uint32_t ioctl_code;
int replysize;
char *p;
const char *mask,
const char *fname,
off_t size,
- uint32 mode,
+ uint32_t mode,
time_t date,
bool uc)
{
struct smb_filename *smb_fname = NULL;
char *fname = NULL;
off_t size;
- uint32 mode;
+ uint32_t mode;
struct timespec date;
- uint32 dirtype;
+ uint32_t dirtype;
unsigned int numentries = 0;
unsigned int maxentries = 0;
bool finished = False;
connection_struct *conn = req->conn;
struct smb_filename *smb_fname = NULL;
char *fname = NULL;
- uint32 fattr=0;
+ uint32_t fattr=0;
off_t size = 0;
time_t mtime=0;
int info;
files_struct *fsp;
int oplock_request;
int deny_mode;
- uint32 dos_attr;
- uint32 access_mask;
- uint32 share_mode;
- uint32 create_disposition;
- uint32 create_options = 0;
+ uint32_t dos_attr;
+ uint32_t access_mask;
+ uint32_t share_mode;
+ uint32_t create_disposition;
+ uint32_t create_options = 0;
uint32_t private_flags = 0;
NTSTATUS status;
TALLOC_CTX *ctx = talloc_tos();
connection_struct *conn = req->conn;
struct smb_filename *smb_fname = NULL;
char *fname = NULL;
- uint16 open_flags;
+ uint16_t open_flags;
int deny_mode;
- uint32 smb_attr;
+ uint32_t smb_attr;
/* Breakout the oplock request bits so we can set the
reply bits separately. */
int ex_oplock_request;
int oplock_request;
#if 0
int smb_sattr = SVAL(req->vwv+4, 0);
- uint32 smb_time = make_unix_date3(req->vwv+6);
+ uint32_t smb_time = make_unix_date3(req->vwv+6);
#endif
int smb_ofun;
- uint32 fattr=0;
+ uint32_t fattr=0;
int mtime=0;
int smb_action = 0;
files_struct *fsp;
NTSTATUS status;
uint64_t allocation_size;
ssize_t retval = -1;
- uint32 access_mask;
- uint32 share_mode;
- uint32 create_disposition;
- uint32 create_options = 0;
+ uint32_t access_mask;
+ uint32_t share_mode;
+ uint32_t create_disposition;
+ uint32_t create_options = 0;
uint32_t private_flags = 0;
TALLOC_CTX *ctx = talloc_tos();
connection_struct *conn = req->conn;
struct smb_filename *smb_fname = NULL;
char *fname = NULL;
- uint32 fattr = 0;
+ uint32_t fattr = 0;
struct smb_file_time ft;
files_struct *fsp;
int oplock_request = 0;
NTSTATUS status;
- uint32 access_mask = FILE_GENERIC_READ | FILE_GENERIC_WRITE;
- uint32 share_mode = FILE_SHARE_READ|FILE_SHARE_WRITE;
- uint32 create_disposition;
- uint32 create_options = 0;
+ uint32_t access_mask = FILE_GENERIC_READ | FILE_GENERIC_WRITE;
+ uint32_t share_mode = FILE_SHARE_READ|FILE_SHARE_WRITE;
+ uint32_t create_disposition;
+ uint32_t create_options = 0;
TALLOC_CTX *ctx = talloc_tos();
START_PROFILE(SMBcreate);
struct smb_filename *smb_fname = NULL;
char *wire_name = NULL;
char *fname = NULL;
- uint32 fattr;
+ uint32_t fattr;
files_struct *fsp;
int oplock_request;
char *s;
********************************************************************/
static NTSTATUS can_rename(connection_struct *conn, files_struct *fsp,
- uint16 dirtype)
+ uint16_t dirtype)
{
if (!CAN_WRITE(conn)) {
return NT_STATUS_MEDIA_WRITE_PROTECTED;
static NTSTATUS do_unlink(connection_struct *conn,
struct smb_request *req,
struct smb_filename *smb_fname,
- uint32 dirtype)
+ uint32_t dirtype)
{
- uint32 fattr;
+ uint32_t fattr;
files_struct *fsp;
- uint32 dirtype_orig = dirtype;
+ uint32_t dirtype_orig = dirtype;
NTSTATUS status;
int ret;
bool posix_paths = lp_posix_pathnames();
****************************************************************************/
NTSTATUS unlink_internals(connection_struct *conn, struct smb_request *req,
- uint32 dirtype, struct smb_filename *smb_fname,
+ uint32_t dirtype, struct smb_filename *smb_fname,
bool has_wild)
{
char *fname_dir = NULL;
connection_struct *conn = req->conn;
char *name = NULL;
struct smb_filename *smb_fname = NULL;
- uint32 dirtype;
+ uint32_t dirtype;
NTSTATUS status;
bool path_contains_wcard = False;
TALLOC_CTX *ctx = talloc_tos();
(fsp->base_fsp == NULL) &&
(fsp->wcp == NULL) &&
lp_use_sendfile(SNUM(conn), xconn->smb1.signing_state) ) {
- uint8 headerbuf[smb_size + 12 * 2 + 1 /* padding byte */];
+ uint8_t headerbuf[smb_size + 12 * 2 + 1 /* padding byte */];
DATA_BLOB header;
if(fsp_stat(fsp) == -1) {
normal_read:
if ((smb_maxcnt & 0xFF0000) > 0x10000) {
- uint8 headerbuf[smb_size + 2*12 + 1 /* padding byte */];
+ uint8_t headerbuf[smb_size + 2*12 + 1 /* padding byte */];
ssize_t ret;
construct_reply_common_req(req, (char *)headerbuf);
void error_to_writebrawerr(struct smb_request *req)
{
- uint8 *old_outbuf = req->outbuf;
+ uint8_t *old_outbuf = req->outbuf;
reply_outbuf(req, 1, 0);
void reply_flush(struct smb_request *req)
{
connection_struct *conn = req->conn;
- uint16 fnum;
+ uint16_t fnum;
files_struct *fsp;
START_PROFILE(SMBflush);
{
char *parent_dir_src = NULL;
char *parent_dir_dst = NULL;
- uint32 mask;
+ uint32_t mask;
mask = is_dir ? FILE_NOTIFY_CHANGE_DIR_NAME
: FILE_NOTIFY_CHANGE_FILE_NAME;
NTSTATUS rename_internals_fsp(connection_struct *conn,
files_struct *fsp,
const struct smb_filename *smb_fname_dst_in,
- uint32 attrs,
+ uint32_t attrs,
bool replace_if_exists)
{
TALLOC_CTX *ctx = talloc_tos();
SMB_ASSERT(lck != NULL);
if(SMB_VFS_RENAME(conn, fsp->fsp_name, smb_fname_dst) == 0) {
- uint32 create_options = fsp->fh->private_options;
+ uint32_t create_options = fsp->fh->private_options;
DEBUG(3, ("rename_internals_fsp: succeeded doing rename on "
"%s -> %s\n", smb_fname_str_dbg(fsp->fsp_name),
struct smb_request *req,
struct smb_filename *smb_fname_src,
struct smb_filename *smb_fname_dst,
- uint32 attrs,
+ uint32_t attrs,
bool replace_if_exists,
bool src_has_wild,
bool dest_has_wild,
char *name = NULL;
char *newname = NULL;
const char *p;
- uint32 attrs;
+ uint32_t attrs;
NTSTATUS status;
bool src_has_wcard = False;
bool dest_has_wcard = False;
struct smb_filename *smb_fname_dst_tmp = NULL;
off_t ret=-1;
files_struct *fsp1,*fsp2;
- uint32 dosattrs;
- uint32 new_create_disposition;
+ uint32_t dosattrs;
+ uint32_t new_create_disposition;
NTSTATUS status;
files_struct *fsp;
unsigned char locktype;
unsigned char oplocklevel;
- uint16 num_ulocks;
- uint16 num_locks;
+ uint16_t num_ulocks;
+ uint16_t num_locks;
int32 lock_timeout;
int i;
const uint8_t *data;
SIVAL(req->outbuf, smb_vwv6, 0);
SIVAL(req->outbuf, smb_vwv8, 0);
} else {
- uint32 allocation_size = SMB_VFS_GET_ALLOC_SIZE(conn,fsp, &fsp->fsp_name->st);
+ uint32_t allocation_size = SMB_VFS_GET_ALLOC_SIZE(conn,fsp, &fsp->fsp_name->st);
SIVAL(req->outbuf, smb_vwv6, (uint32)fsp->fsp_name->st.st_ex_size);
SIVAL(req->outbuf, smb_vwv8, allocation_size);
}
}
DEBUG(10,("get_ea_value: EA %s is of length %u\n", ea_name, (unsigned int)sizeret));
- dump_data(10, (uint8 *)val, sizeret);
+ dump_data(10, (uint8_t *)val, sizeret);
pea->flags = 0;
if (strnequal(ea_name, "user.", 5)) {
time_t open_time;
#endif
int open_ofun;
- uint32 open_size;
+ uint32_t open_size;
char *pname;
char *fname = NULL;
off_t size=0;
int smb_action = 0;
files_struct *fsp;
struct ea_list *ea_list = NULL;
- uint16 flags = 0;
+ uint16_t flags = 0;
NTSTATUS status;
- uint32 access_mask;
- uint32 share_mode;
- uint32 create_disposition;
- uint32 create_options = 0;
+ uint32_t access_mask;
+ uint32_t share_mode;
+ uint32_t create_disposition;
+ uint32_t create_options = 0;
uint32_t private_flags = 0;
TALLOC_CTX *ctx = talloc_tos();
SIVAL(params,20,inode);
SSVAL(params,24,0); /* Padding. */
if (flags & 8) {
- uint32 ea_size = estimate_ea_size(conn, fsp,
+ uint32_t ea_size = estimate_ea_size(conn, fsp,
smb_fname);
SIVAL(params, 26, ea_size);
} else {
Return the filetype for UNIX extensions.
****************************************************************************/
-static uint32 unix_filetype(mode_t mode)
+static uint32_t unix_filetype(mode_t mode)
{
if(S_ISREG(mode))
return UNIX_TYPE_FILE;
static NTSTATUS unix_perms_from_wire( connection_struct *conn,
const SMB_STRUCT_STAT *psbuf,
- uint32 perms,
+ uint32_t perms,
enum perm_type ptype,
mode_t *ret_perms)
{
NTSTATUS smbd_dirptr_lanman2_entry(TALLOC_CTX *ctx,
connection_struct *conn,
struct dptr_struct *dirptr,
- uint16 flags2,
+ uint16_t flags2,
const char *path_mask,
- uint32 dirtype,
+ uint32_t dirtype,
int info_level,
int requires_resume_key,
bool dont_descend,
static NTSTATUS get_lanman2_dir_entry(TALLOC_CTX *ctx,
connection_struct *conn,
struct dptr_struct *dirptr,
- uint16 flags2,
+ uint16_t flags2,
const char *path_mask,
- uint32 dirtype,
+ uint32_t dirtype,
int info_level,
bool requires_resume_key,
bool dont_descend,
char *params = *pparams;
char *pdata = *ppdata;
char *data_end;
- uint32 dirtype;
+ uint32_t dirtype;
int maxentries;
- uint16 findfirst_flags;
+ uint16_t findfirst_flags;
bool close_after_first;
bool close_if_end;
bool requires_resume_key;
DEBUG(5,("dir=%s, mask = %s\n",directory, mask));
if (info_level == SMB_FIND_EA_LIST) {
- uint32 ea_size;
+ uint32_t ea_size;
if (total_data < 4) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
char *data_end;
int dptr_num;
int maxentries;
- uint16 info_level;
- uint32 resume_key;
- uint16 findnext_flags;
+ uint16_t info_level;
+ uint32_t resume_key;
+ uint16_t findnext_flags;
bool close_after_request;
bool close_if_end;
bool requires_resume_key;
const char *mask = NULL;
const char *directory = NULL;
char *p = NULL;
- uint16 dirtype;
+ uint16_t dirtype;
int numentries = 0;
int i, last_entry_off=0;
bool finished = False;
}
if (info_level == SMB_FIND_EA_LIST) {
- uint32 ea_size;
+ uint32_t ea_size;
if (total_data < 4) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
const char *fstype = lp_fstype(SNUM(conn));
const char *filename = NULL;
const uint64_t bytes_per_sector = 512;
- uint32 additional_flags = 0;
+ uint32_t additional_flags = 0;
struct smb_filename smb_fname;
SMB_STRUCT_STAT st;
NTSTATUS status = NT_STATUS_OK;
struct smbXsrv_connection *xconn = req->xconn;
char *pdata = *ppdata;
char *params = *pparams;
- uint16 info_level;
+ uint16_t info_level;
DEBUG(10,("call_trans2setfsinfo: for service [%s]\n",
lp_servicename(talloc_tos(), SNUM(conn))));
};
static void map_info2_flags_from_sbuf(const SMB_STRUCT_STAT *psbuf,
- uint32 *smb_fflags, uint32 *smb_fmask)
+ uint32_t *smb_fflags, uint32_t *smb_fmask)
{
int i;
}
static bool map_info2_flags_to_sbuf(const SMB_STRUCT_STAT *psbuf,
- const uint32 smb_fflags,
- const uint32 smb_fmask,
+ const uint32_t smb_fflags,
+ const uint32_t smb_fmask,
int *stat_fflags)
{
- uint32 max_fmask = 0;
+ uint32_t max_fmask = 0;
int i;
*stat_fflags = psbuf->st_ex_flags;
files_struct *fsp,
const SMB_STRUCT_STAT *psbuf)
{
- uint32 file_flags = 0;
- uint32 flags_mask = 0;
+ uint32_t file_flags = 0;
+ uint32_t flags_mask = 0;
pdata = store_file_unix_basic(conn, pdata, fsp, psbuf);
char *pdata = *ppdata;
unsigned int data_size = 0;
unsigned int param_size = 2;
- uint16 info_level;
+ uint16_t info_level;
files_struct *fsp;
if (!params) {
{
SMB_ACL_T file_acl = NULL;
SMB_ACL_T def_acl = NULL;
- uint16 num_file_acls = 0;
- uint16 num_def_acls = 0;
+ uint16_t num_file_acls = 0;
+ uint16_t num_def_acls = 0;
if (fsp && fsp->fh->fd != -1) {
file_acl = SMB_VFS_SYS_ACL_GET_FD(fsp,
{
char *params = *pparams;
char *pdata = *ppdata;
- uint16 info_level;
+ uint16_t info_level;
unsigned int data_size = 0;
unsigned int param_size = 2;
struct smb_filename *smb_fname = NULL;
case SMB_INFO_QUERY_EAS_FROM_LIST:
{
/* Pull any EA list from the data portion. */
- uint32 ea_size;
+ uint32_t ea_size;
if (total_data < 4) {
reply_nterror(
bool setting_write_time)
{
struct smb_filename smb_fname_base;
- uint32 action =
+ uint32_t action =
FILE_NOTIFY_CHANGE_LAST_ACCESS
|FILE_NOTIFY_CHANGE_LAST_WRITE
|FILE_NOTIFY_CHANGE_CREATION;
static NTSTATUS smb_set_file_dosmode(connection_struct *conn,
const struct smb_filename *smb_fname,
- uint32 dosmode)
+ uint32_t dosmode)
{
struct smb_filename *smb_fname_base;
NTSTATUS status;
{
NTSTATUS status = NT_STATUS_OK;
bool delete_on_close;
- uint32 dosmode = 0;
+ uint32_t dosmode = 0;
if (total_data < 1) {
return NT_STATUS_INVALID_PARAMETER;
const char *pdata,
int total_data)
{
- uint32 mode;
+ uint32_t mode;
if (total_data < 4) {
return NT_STATUS_INVALID_PARAMETER;
struct smb_filename *smb_fname_src)
{
bool overwrite;
- uint32 root_fid;
- uint32 len;
+ uint32_t root_fid;
+ uint32_t len;
char *newname = NULL;
struct smb_filename *smb_fname_dst = NULL;
bool dest_has_wcard = False;
files_struct *fsp,
const struct smb_filename *smb_fname)
{
- uint16 posix_acl_version;
- uint16 num_file_acls;
- uint16 num_def_acls;
+ uint16_t posix_acl_version;
+ uint16_t num_file_acls;
+ uint16_t num_def_acls;
bool valid_file_acls = True;
bool valid_def_acls = True;
{
/* Patch to do this correctly from Paul Eggert <eggert@twinsun.com>. */
struct smb_file_time ft;
- uint32 dosmode = 0;
+ uint32_t dosmode = 0;
NTSTATUS status = NT_STATUS_OK;
ZERO_STRUCT(ft);
int total_data,
const struct smb_filename *smb_fname)
{
- uint32 file_type = IVAL(pdata,56);
+ uint32_t file_type = IVAL(pdata,56);
#if defined(HAVE_MAKEDEV)
- uint32 dev_major = IVAL(pdata,60);
- uint32 dev_minor = IVAL(pdata,68);
+ uint32_t dev_major = IVAL(pdata,60);
+ uint32_t dev_minor = IVAL(pdata,68);
#endif
SMB_DEV_T dev = (SMB_DEV_T)0;
- uint32 raw_unixmode = IVAL(pdata,84);
+ uint32_t raw_unixmode = IVAL(pdata,84);
NTSTATUS status;
mode_t unixmode;
const struct smb_filename *smb_fname)
{
struct smb_file_time ft;
- uint32 raw_unixmode;
+ uint32_t raw_unixmode;
mode_t unixmode;
off_t size = 0;
uid_t set_owner = (uid_t)SMB_UID_NO_CHANGE;
const struct smb_filename *smb_fname)
{
NTSTATUS status;
- uint32 smb_fflags;
- uint32 smb_fmask;
+ uint32_t smb_fflags;
+ uint32_t smb_fmask;
if (total_data < 116) {
return NT_STATUS_INVALID_PARAMETER;
int *pdata_return_size)
{
NTSTATUS status = NT_STATUS_OK;
- uint32 raw_unixmode = 0;
- uint32 mod_unixmode = 0;
+ uint32_t raw_unixmode = 0;
+ uint32_t mod_unixmode = 0;
mode_t unixmode = (mode_t)0;
files_struct *fsp = NULL;
- uint16 info_level_return = 0;
+ uint16_t info_level_return = 0;
int info;
char *pdata = *ppdata;
{
bool extended_oplock_granted = False;
char *pdata = *ppdata;
- uint32 flags = 0;
- uint32 wire_open_mode = 0;
- uint32 raw_unixmode = 0;
- uint32 mod_unixmode = 0;
- uint32 create_disp = 0;
- uint32 access_mask = 0;
- uint32 create_options = FILE_NON_DIRECTORY_FILE;
+ uint32_t flags = 0;
+ uint32_t wire_open_mode = 0;
+ uint32_t raw_unixmode = 0;
+ uint32_t mod_unixmode = 0;
+ uint32_t create_disp = 0;
+ uint32_t access_mask = 0;
+ uint32_t create_options = FILE_NON_DIRECTORY_FILE;
NTSTATUS status = NT_STATUS_OK;
mode_t unixmode = (mode_t)0;
files_struct *fsp = NULL;
int oplock_request = 0;
int info = 0;
- uint16 info_level_return = 0;
+ uint16_t info_level_return = 0;
if (total_data < 18) {
return NT_STATUS_INVALID_PARAMETER;
{
NTSTATUS status = NT_STATUS_OK;
files_struct *fsp = NULL;
- uint16 flags = 0;
+ uint16_t flags = 0;
char del = 1;
int info = 0;
int create_options = 0;
{
char *params = *pparams;
char *pdata = *ppdata;
- uint16 info_level;
+ uint16_t info_level;
struct smb_filename *smb_fname = NULL;
files_struct *fsp = NULL;
NTSTATUS status = NT_STATUS_OK;
unsigned int max_data_bytes)
{
char *params = *pparams;
- uint16 info_level;
+ uint16_t info_level;
if (total_params < 6) {
reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
if (procid_to_pid(&pid) != 0)
return NT_STATUS_IS_OK(
messaging_send_buf(msg_ctx, pid, msg_type,
- (const uint8 *)buf, len));
+ (const uint8_t *)buf, len));
ret = message_send_all(msg_ctx, msg_type, buf, len, &n_sent);
DEBUG(10,("smbcontrol/send_message: broadcast message to "
goto send;
} else if (strcmp(cmd, "printer") == 0) {
- uint32 attribute;
+ uint32_t attribute;
if (argc != 5) {
fprintf(stderr, "Usage: smbcontrol <dest> printnotify "
5 times. */
for (retry = 0; retry < 5; retry++) {
- uint8 buf[4];
+ uint8_t buf[4];
TDB_DATA d = { .dptr = buf, .dsize = sizeof(buf) };
SIVAL(buf, 0, time(NULL));