diff options
author | David O'Neill <dmo@samba.org> | 2001-01-11 20:41:19 +0000 |
---|---|---|
committer | David O'Neill <dmo@samba.org> | 2001-01-11 20:41:19 +0000 |
commit | 3380ffae9c231a34406dd694c9ab03bb0b6d8070 (patch) | |
tree | e25ee6fb578ca509f506a5fbf8d631f2e7c17312 /source3/printing/printing.c | |
parent | a4763f59382a66a2ad45ce6ba88fe03faca18714 (diff) | |
download | samba-3380ffae9c231a34406dd694c9ab03bb0b6d8070.tar.gz samba-3380ffae9c231a34406dd694c9ab03bb0b6d8070.tar.xz samba-3380ffae9c231a34406dd694c9ab03bb0b6d8070.zip |
Changes from APPLIANCE_HEAD:
testsuite/printing/psec.c
- Use lock directory from smb.conf parameter when peeking at the
ntdrivers.tdb file.
source/rpc_parse/parse_sec.c
- fix typo in debug message
source/script/installbin.sh
- create private directory as part of 'make install'.
source/nsswitch/winbindd_cache.c
source/nsswitch/winbindd_idmap.c
source/passdb/secrets.c
source/smbd/connection.c
- always convert tdb key to unix code-page when generating.
source/printing/nt_printing.c
- always convert tdb key to unix code-page when generating.
- don't prepend path to a filename that is NULL in
add_a_printer_driver_3().
source/rpc_server/srv_spoolss_nt.c
- always convert tdb key to unix code-page when generating.
- don't prepend server name to a path/filename that is NULL in the
fill_printer_driver_info functions.
source/printing/printing.c
- always convert tdb key to unix code-page when generating.
- move access check for print_queue_purge() outside of job delete
loop.
source/smbd/unix_acls.c
- fix for setting ACLs (this got missed earlier)
source/lib/messages.c
- trivial sync with appliance_head
(This used to be commit 376601d17d53ef7bfaafa576bd770e554516e808)
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r-- | source3/printing/printing.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c index cfe194ab173..3f8c542ec7d 100644 --- a/source3/printing/printing.c +++ b/source3/printing/printing.c @@ -304,6 +304,7 @@ static void print_cache_flush(int snum) { fstring key; slprintf(key, sizeof(key), "CACHE/%s", lp_servicename(snum)); + dos_to_unix(key, True); /* Convert key to unix-codepage */ tdb_store_int(tdb, key, -1); } @@ -324,8 +325,11 @@ static void print_queue_update(int snum) struct traverse_struct tstruct; fstring keystr, printer_name; TDB_DATA data, key; - + + /* Convert printer name (i.e. share name) to unix-codepage for all of the + * following tdb key generation */ fstrcpy(printer_name, lp_servicename(snum)); + dos_to_unix(printer_name, True); /* * Update the cache time FIRST ! Stops others doing this @@ -428,7 +432,7 @@ static void print_queue_update(int snum) /* store the new queue status structure */ slprintf(keystr, sizeof(keystr), "STATUS/%s", printer_name); - key.dptr = keystr; + key.dptr = keystr; key.dsize = strlen(keystr); status.qcount = qcount; @@ -722,6 +726,7 @@ static BOOL print_cache_expired(int snum) time_t t2, t = time(NULL); slprintf(key, sizeof(key), "CACHE/%s", lp_servicename(snum)); + dos_to_unix(key, True); /* Convert key to unix-codepage */ t2 = tdb_fetch_int(tdb, key); if (t2 == ((time_t)-1) || (t - t2) >= lp_lpqcachetime()) { DEBUG(3, ("print cache expired\n")); @@ -741,6 +746,7 @@ static int get_queue_status(int snum, print_status_struct *status) ZERO_STRUCTP(status); slprintf(keystr, sizeof(keystr), "STATUS/%s", lp_servicename(snum)); + dos_to_unix(keystr, True); /* Convert key to unix-codepage */ key.dptr = keystr; key.dsize = strlen(keystr); data = tdb_fetch(tdb, key); @@ -1065,6 +1071,7 @@ int print_queue_status(int snum, */ ZERO_STRUCTP(status); slprintf(keystr, sizeof(keystr), "STATUS/%s", lp_servicename(snum)); + dos_to_unix(keystr, True); /* Convert key to unix-codepage */ key.dptr = keystr; key.dsize = strlen(keystr); data = tdb_fetch(tdb, key); @@ -1203,8 +1210,9 @@ BOOL print_queue_purge(struct current_user *user, int snum, int *errcode) int njobs, i; njobs = print_queue_status(snum, &queue, &status); - for (i=0;i<njobs;i++) { - if (print_access_check(user, snum, PRINTER_ACCESS_ADMINISTER)) { + + if (print_access_check(user, snum, PRINTER_ACCESS_ADMINISTER)) { + for (i=0;i<njobs;i++) { print_job_delete1(queue[i].job); } } |