/* The following definitions come from lib/secdesc.c */
uint32_t get_sec_info(const SEC_DESC *sd);
-SEC_DESC_BUF *sec_desc_merge(TALLOC_CTX *ctx, SEC_DESC_BUF *new_sdb, SEC_DESC_BUF *old_sdb);
+SEC_DESC *sec_desc_merge(TALLOC_CTX *ctx, SEC_DESC *new_sdb, SEC_DESC *old_sdb);
+SEC_DESC_BUF *sec_desc_merge_buf(TALLOC_CTX *ctx, SEC_DESC_BUF *new_sdb, SEC_DESC_BUF *old_sdb);
SEC_DESC *make_sec_desc(TALLOC_CTX *ctx,
enum security_descriptor_revision revision,
uint16 type,
struct passwd *getpwnam_alloc(TALLOC_CTX *mem_ctx, const char *name);
struct passwd *getpwuid_alloc(TALLOC_CTX *mem_ctx, uid_t uid) ;
-/* The following definitions come from lib/util_reg.c */
+/* The following definitions come from ..libcli/registry/util_reg.c */
-const char *reg_type_lookup(enum winreg_Type type);
+const char *str_regtype(int type);
bool push_reg_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
DATA_BLOB *blob, const char *s);
bool push_reg_multi_sz(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *ic,
NTSTATUS cli_qpathinfo_alt_name(struct cli_state *cli, const char *fname, fstring alt_name);
/* The following definitions come from libsmb/clirap2.c */
+struct rap_group_info_1;
+struct rap_user_info_1;
+struct rap_share_info_2;
int cli_NetGroupDelete(struct cli_state *cli, const char *group_name);
-int cli_NetGroupAdd(struct cli_state *cli, RAP_GROUP_INFO_1 *grinfo);
+int cli_NetGroupAdd(struct cli_state *cli, struct rap_group_info_1 *grinfo);
int cli_RNetGroupEnum(struct cli_state *cli, void (*fn)(const char *, const char *, void *), void *state);
int cli_RNetGroupEnum0(struct cli_state *cli,
void (*fn)(const char *, void *),
int cli_NetGroupGetUsers(struct cli_state * cli, const char *group_name, void (*fn)(const char *, void *), void *state );
int cli_NetUserGetGroups(struct cli_state * cli, const char *user_name, void (*fn)(const char *, void *), void *state );
int cli_NetUserDelete(struct cli_state *cli, const char * user_name );
-int cli_NetUserAdd(struct cli_state *cli, RAP_USER_INFO_1 * userinfo );
+int cli_NetUserAdd(struct cli_state *cli, struct rap_user_info_1 * userinfo );
int cli_RNetUserEnum(struct cli_state *cli, void (*fn)(const char *, const char *, const char *, const char *, void *), void *state);
int cli_RNetUserEnum0(struct cli_state *cli,
void (*fn)(const char *, void *),
const char * base_path,
void (*fn)(const char *, const char *, uint16, uint16,
uint32));
-int cli_NetShareAdd(struct cli_state *cli, RAP_SHARE_INFO_2 * sinfo );
+int cli_NetShareAdd(struct cli_state *cli, struct rap_share_info_2 * sinfo );
int cli_NetShareDelete(struct cli_state *cli, const char * share_name );
bool cli_get_pdc_name(struct cli_state *cli, const char *workgroup, char **pdc_name);
bool cli_get_server_domain(struct cli_state *cli);
NT_DEVICEMODE *construct_nt_devicemode(const fstring default_devicename);
void free_nt_devicemode(NT_DEVICEMODE **devmode_ptr);
int unpack_devicemode(NT_DEVICEMODE **nt_devmode, const uint8 *buf, int buflen);
+WERROR spoolss_create_default_devmode(TALLOC_CTX *mem_ctx,
+ const char *devicename,
+ struct spoolss_DeviceMode **devmode);
int add_new_printer_key( NT_PRINTER_DATA *data, const char *name );
int delete_printer_key( NT_PRINTER_DATA *data, const char *name );
int lookup_printerkey( NT_PRINTER_DATA *data, const char *name );
uint32 level,
const char *sharename);
uint32 free_a_printer(NT_PRINTER_INFO_LEVEL **pp_printer, uint32 level);
+bool driver_info_ctr_to_info8(struct spoolss_AddDriverInfoCtr *r,
+ struct spoolss_DriverInfo8 *_info8);
uint32_t add_a_printer_driver(TALLOC_CTX *mem_ctx,
struct spoolss_AddDriverInfoCtr *r,
char **driver_name,
int print_job_fd(const char* sharename, uint32 jobid);
char *print_job_fname(const char* sharename, uint32 jobid);
NT_DEVICEMODE *print_job_devmode(const char* sharename, uint32 jobid);
-bool print_job_set_place(const char *sharename, uint32 jobid, int place);
-bool print_job_set_name(const char *sharename, uint32 jobid, char *name);
+bool print_job_set_name(const char *sharename, uint32 jobid, const char *name);
+bool print_job_get_name(TALLOC_CTX *mem_ctx, const char *sharename, uint32_t jobid, char **name);
bool print_job_delete(struct auth_serversupplied_info *server_info, int snum,
uint32 jobid, WERROR *errcode);
bool print_job_pause(struct auth_serversupplied_info *server_info, int snum,
/* The following definitions come from smbd/blocking.c */
+void brl_timeout_fn(struct event_context *event_ctx,
+ struct timed_event *te,
+ struct timeval now,
+ void *private_data);
+struct timeval timeval_brl_min(const struct timeval *tv1,
+ const struct timeval *tv2);
void process_blocking_lock_queue(void);
bool push_blocking_lock_request( struct byte_range_lock *br_lck,
struct smb_request *req,
uint64_t count,
uint32 blocking_pid);
void cancel_pending_lock_requests_by_fid(files_struct *fsp, struct byte_range_lock *br_lck);
-void remove_pending_lock_requests_by_mid(uint64_t mid);
-bool blocking_lock_was_deferred(uint64_t mid);
-struct blocking_lock_record *blocking_lock_cancel(files_struct *fsp,
+void remove_pending_lock_requests_by_mid_smb1(uint64_t mid);
+bool blocking_lock_was_deferred_smb1(uint64_t mid);
+struct blocking_lock_record *blocking_lock_cancel_smb1(files_struct *fsp,
uint32 lock_pid,
uint64_t offset,
uint64_t count,
char *params, int paramsize,
char *pdata, int datasize);
void reply_ntcreate_and_X(struct smb_request *req);
+NTSTATUS set_sd(files_struct *fsp, uint8_t *data, uint32_t sd_len,
+ uint32_t security_info_sent);
struct ea_list *read_nttrans_ea_list(TALLOC_CTX *ctx, const char *pdata, size_t data_size);
void reply_ntcancel(struct smb_request *req);
void reply_ntrename(struct smb_request *req);
+NTSTATUS smbd_do_query_security_desc(connection_struct *conn,
+ TALLOC_CTX *mem_ctx,
+ files_struct *fsp,
+ uint32_t security_info_wanted,
+ uint32_t max_data_count,
+ uint8_t **ppmarshalled_sd,
+ size_t *psd_size);
void reply_nttrans(struct smb_request *req);
void reply_nttranss(struct smb_request *req);
uint32 *pcreate_disposition,
uint32 *pcreate_options,
uint32_t *pprivate_flags);
+void remove_deferred_open_entry(struct file_id id, uint64_t mid);
NTSTATUS open_file_fchmod(struct smb_request *req, connection_struct *conn,
struct smb_filename *smb_fname,
files_struct **result);
struct timeval *p_request_time,
void **pp_state);
bool push_deferred_open_message_smb(struct smb_request *req,
- struct timeval request_time,
- struct timeval timeout,
- char *private_data, size_t priv_len);
+ struct timeval request_time,
+ struct timeval timeout,
+ struct file_id id,
+ char *private_data,
+ size_t priv_len);
struct idle_event *event_add_idle(struct event_context *event_ctx,
TALLOC_CTX *mem_ctx,
struct timeval interval,