diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-09-03 10:38:13 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-09-03 10:38:13 +0000 |
commit | fbc1f326f445a2826a10155fe0122c779bb1f80e (patch) | |
tree | fe1f9bae2b3f275071654f4e789991df073d9f0d /source3/printing | |
parent | 2771d77c6025dd7a1b5fbf2c0f863e334655b323 (diff) | |
download | samba-fbc1f326f445a2826a10155fe0122c779bb1f80e.tar.gz samba-fbc1f326f445a2826a10155fe0122c779bb1f80e.tar.xz samba-fbc1f326f445a2826a10155fe0122c779bb1f80e.zip |
more NTSTATUS/WERROR conversion
(This used to be commit ad648c5cd8ebe4be8304379117f403d7673dcbc8)
Diffstat (limited to 'source3/printing')
-rw-r--r-- | source3/printing/nt_printing.c | 10 | ||||
-rw-r--r-- | source3/printing/printing.c | 22 |
2 files changed, 16 insertions, 16 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 8afd5195af..0c3a71c1d6 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -3388,18 +3388,18 @@ BOOL get_specific_param(NT_PRINTER_INFO_LEVEL printer, uint32 level, Store a security desc for a printer. ****************************************************************************/ -uint32 nt_printing_setsec(char *printername, SEC_DESC_BUF *secdesc_ctr) +WERROR nt_printing_setsec(char *printername, SEC_DESC_BUF *secdesc_ctr) { SEC_DESC_BUF *new_secdesc_ctr = NULL; SEC_DESC_BUF *old_secdesc_ctr = NULL; prs_struct ps; TALLOC_CTX *mem_ctx = NULL; fstring key; - NTSTATUS status; + WERROR status; mem_ctx = talloc_init(); if (mem_ctx == NULL) - return False; + return WERR_NOMEM; /* The old owner and group sids of the security descriptor are not present when new ACEs are added or removed by changing printer @@ -3454,7 +3454,7 @@ uint32 nt_printing_setsec(char *printername, SEC_DESC_BUF *secdesc_ctr) if (!sec_io_desc_buf("nt_printing_setsec", &new_secdesc_ctr, &ps, 1)) { - status = ERRbadfunc; + status = WERR_BADFUNC; goto out; } @@ -3464,7 +3464,7 @@ uint32 nt_printing_setsec(char *printername, SEC_DESC_BUF *secdesc_ctr) status = 0; } else { DEBUG(1,("Failed to store secdesc for %s\n", printername)); - status = ERRbadfunc; + status = WERR_BADFUNC; } /* Free malloc'ed memory */ diff --git a/source3/printing/printing.c b/source3/printing/printing.c index 370abd4fdf..8be46488dd 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -603,7 +603,7 @@ static BOOL is_owner(struct current_user *user, int jobid) /**************************************************************************** delete a print job ****************************************************************************/ -BOOL print_job_delete(struct current_user *user, int jobid, int *errcode) +BOOL print_job_delete(struct current_user *user, int jobid, WERROR *errcode) { int snum = print_job_snum(jobid); char *printer_name; @@ -617,7 +617,7 @@ BOOL print_job_delete(struct current_user *user, int jobid, int *errcode) if (!owner && !print_access_check(user, snum, JOB_ACCESS_ADMINISTER)) { DEBUG(3, ("delete denied by security descriptor\n")); - *errcode = ERRnoaccess; + *errcode = WERR_ACCESS_DENIED; return False; } @@ -641,7 +641,7 @@ BOOL print_job_delete(struct current_user *user, int jobid, int *errcode) /**************************************************************************** pause a job ****************************************************************************/ -BOOL print_job_pause(struct current_user *user, int jobid, int *errcode) +BOOL print_job_pause(struct current_user *user, int jobid, WERROR *errcode) { struct printjob *pjob = print_job_find(jobid); int snum, ret = -1; @@ -685,7 +685,7 @@ BOOL print_job_pause(struct current_user *user, int jobid, int *errcode) /**************************************************************************** resume a job ****************************************************************************/ -BOOL print_job_resume(struct current_user *user, int jobid, int *errcode) +BOOL print_job_resume(struct current_user *user, int jobid, WERROR *errcode) { struct printjob *pjob = print_job_find(jobid); char *printer_name; @@ -1184,20 +1184,20 @@ int print_queue_snum(char *qname) /**************************************************************************** pause a queue ****************************************************************************/ -BOOL print_queue_pause(struct current_user *user, int snum, int *errcode) +BOOL print_queue_pause(struct current_user *user, int snum, WERROR *errcode) { char *printer_name; int ret; if (!print_access_check(user, snum, PRINTER_ACCESS_ADMINISTER)) { - *errcode = ERRnoaccess; + *errcode = WERR_ACCESS_DENIED; return False; } ret = (*(current_printif->queue_pause))(snum); if (ret != 0) { - *errcode = ERRinvalidparam; + *errcode = WERR_INVALID_PARAM; return False; } @@ -1216,20 +1216,20 @@ BOOL print_queue_pause(struct current_user *user, int snum, int *errcode) /**************************************************************************** resume a queue ****************************************************************************/ -BOOL print_queue_resume(struct current_user *user, int snum, int *errcode) +BOOL print_queue_resume(struct current_user *user, int snum, WERROR *errcode) { char *printer_name; int ret; if (!print_access_check(user, snum, PRINTER_ACCESS_ADMINISTER)) { - *errcode = ERRnoaccess; + *errcode = WERR_ACCESS_DENIED; return False; } ret = (*(current_printif->queue_resume))(snum); if (ret != 0) { - *errcode = ERRinvalidparam; + *errcode = WERR_INVALID_PARAM; return False; } @@ -1248,7 +1248,7 @@ BOOL print_queue_resume(struct current_user *user, int snum, int *errcode) /**************************************************************************** purge a queue - implemented by deleting all jobs that we can delete ****************************************************************************/ -BOOL print_queue_purge(struct current_user *user, int snum, int *errcode) +BOOL print_queue_purge(struct current_user *user, int snum, WERROR *errcode) { print_queue_struct *queue; print_status_struct status; |