summaryrefslogtreecommitdiffstats
path: root/source3/rpc_server/srv_spoolss_nt.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-03-07 23:59:13 +0000
committerJeremy Allison <jra@samba.org>2001-03-07 23:59:13 +0000
commit393bede7db6af546431cd5255e465b7b7b0e7c81 (patch)
tree44a95a722eba6f412e50efc34e2233baa31fe987 /source3/rpc_server/srv_spoolss_nt.c
parent2b22019e426c4bb7a5745a326c302a4e19aa5ff2 (diff)
downloadsamba-393bede7db6af546431cd5255e465b7b7b0e7c81.tar.gz
samba-393bede7db6af546431cd5255e465b7b7b0e7c81.tar.xz
samba-393bede7db6af546431cd5255e465b7b7b0e7c81.zip
Sync up handle creation with 2.2 branch. We can now join AS/U domains and
authenticate against them. Big/little endian issues fixed. Jeremy. (This used to be commit 0e6a34510ed598eaec7fe71a9c91fda528a4675c)
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 5c400522951..0fb38b84db2 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -84,8 +84,8 @@ static ubi_dlList counter_list;
static struct cli_state cli;
static uint32 smb_connections=0;
-#define OPEN_HANDLE(pnum) ((pnum!=NULL) && (pnum->open!=False) && (IVAL(pnum->printer_hnd.data,16)==(uint32)sys_getpid()))
-#define OUR_HANDLE(pnum) ((pnum==NULL)?"NULL":(IVAL(pnum->data,16)==sys_getpid()?"OURS":"OTHER"))
+#define OPEN_HANDLE(pnum) ((pnum!=NULL) && (pnum->open!=False) && (IVAL(pnum->printer_hnd.data5,4)==(uint32)sys_getpid()))
+#define OUR_HANDLE(pnum) ((pnum==NULL)?"NULL":(IVAL(pnum->data5,4)==(uint32)sys_getpid()?"OURS":"OTHER"))
/* translate between internal status numbers and NT status numbers */
static int nt_printj_status(int v)
@@ -215,15 +215,7 @@ static void create_printer_hnd(POLICY_HND *hnd)
if (hnd == NULL) return;
- /* i severely doubt that prt_hnd_high will ever be non-zero... */
- prt_hnd_low++;
- if (prt_hnd_low == 0) prt_hnd_high++;
-
- SIVAL(hnd->data, 0 , 0x0); /* first bit must be null */
- SIVAL(hnd->data, 4 , prt_hnd_low ); /* second bit is incrementing */
- SIVAL(hnd->data, 8 , prt_hnd_high); /* second bit is incrementing */
- SIVAL(hnd->data, 12, time(NULL)); /* something random */
- SIVAL(hnd->data, 16, sys_getpid()); /* something more random */
+ create_policy_handle(hnd, &prt_hnd_low, &prt_hnd_high);
}
/****************************************************************************