WERROR winreg_create_printer(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
+ const char *servername,
const char *sharename);
/**
*
* @param[in] server_info The server supplied session info.
*
+ * @param[in] sharename The share name.
+ *
* @param[in] info2_mask A bitmask which defines which values should be set.
*
* @param[in] info2 A SetPrinterInfo2 structure with the data to set.
*/
WERROR winreg_update_printer(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
+ const char *sharename,
uint32_t info2_mask,
struct spoolss_SetPrinterInfo2 *info2,
struct spoolss_DeviceMode *devmode,
*
* @param[in] server_info The server supplied session info.
*
+ * @param[in] printer The servername to use.
+ *
* @param[in] printer The name of the printer to get.
*
* @param[out] pinfo2 A pointer to store a PRINTER_INFO_2 structure.
*/
WERROR winreg_get_printer(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
+ const char *servername,
const char *printer,
struct spoolss_PrinterInfo2 **pinfo2);
+/**
+ * @brief Get the security descriptor for a printer.
+ *
+ * @param[in] mem_ctx The talloc memory context to use.
+ *
+ * @param[in] server_info The server supplied session info.
+ *
+ * @param[in] sharename The share name.
+ *
+ * @param[out] psecdesc A pointer to store the security descriptor.
+ *
+ * @return On success WERR_OK, a corresponding DOS error is
+ * something went wrong.
+ */
+WERROR winreg_get_printer_secdesc(TALLOC_CTX *mem_ctx,
+ struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
+ const char *sharename,
+ struct spoolss_security_descriptor **psecdesc);
+
+/**
+ * @brief Set the security descriptor for a printer.
+ *
+ * @param[in] mem_ctx The talloc memory context to use.
+ *
+ * @param[in] server_info The server supplied session info.
+ *
+ * @param[in] sharename The share name.
+ *
+ * @param[in] secdesc The security descriptor to save.
+ *
+ * @return On success WERR_OK, a corresponding DOS error is
+ * something went wrong.
+ */
+WERROR winreg_set_printer_secdesc(TALLOC_CTX *mem_ctx,
+ struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
+ const char *sharename,
+ const struct spoolss_security_descriptor *secdesc);
+
/**
* @internal
*
*/
WERROR winreg_set_printer_dataex(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *printer,
const char *key,
const char *value,
*/
WERROR winreg_get_printer_dataex(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *printer,
const char *key,
const char *value,
*/
WERROR winreg_enum_printer_dataex(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *printer,
const char *key,
uint32_t *pnum_values,
*/
WERROR winreg_delete_printer_dataex(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *printer,
const char *key,
const char *value);
*/
WERROR winreg_enum_printer_key(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *printer,
const char *key,
uint32_t *pnum_subkeys,
*/
WERROR winreg_delete_printer_key(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *printer,
const char *key);
*/
WERROR winreg_printer_update_changeid(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *printer);
/**
*/
WERROR winreg_printer_get_changeid(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
const char *printer,
uint32_t *pchangeid);
*/
WERROR winreg_printer_addform1(TALLOC_CTX *mem_ctx,
struct auth_serversupplied_info *server_info,
+ struct messaging_context *msg_ctx,
struct spoolss_AddFormInfo1 *form);
/*