diff options
author | Jeremy Allison <jra@samba.org> | 2002-01-22 19:45:17 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-01-22 19:45:17 +0000 |
commit | 6406a42d012184f5289d4a2b1c07a55556635fe4 (patch) | |
tree | 6448a11109ad65f37aa202164a8abbf2d3734525 /source/rpc_server | |
parent | 38d2d26af9ef4d90dcb57fa940267f7136876191 (diff) | |
download | samba-6406a42d012184f5289d4a2b1c07a55556635fe4.tar.gz samba-6406a42d012184f5289d4a2b1c07a55556635fe4.tar.xz samba-6406a42d012184f5289d4a2b1c07a55556635fe4.zip |
Merge of fixes from 2.2.
Jeremy.
Diffstat (limited to 'source/rpc_server')
-rw-r--r-- | source/rpc_server/srv_lsa_hnd.c | 19 | ||||
-rw-r--r-- | source/rpc_server/srv_reg_nt.c | 9 | ||||
-rw-r--r-- | source/rpc_server/srv_spoolss_nt.c | 2 |
3 files changed, 15 insertions, 15 deletions
diff --git a/source/rpc_server/srv_lsa_hnd.c b/source/rpc_server/srv_lsa_hnd.c index e4a00443a10..5affa9f5b03 100644 --- a/source/rpc_server/srv_lsa_hnd.c +++ b/source/rpc_server/srv_lsa_hnd.c @@ -110,15 +110,16 @@ BOOL create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *) pol->data_ptr = data_ptr; pol->free_fn = free_fn; - pol_hnd_low++; - if (pol_hnd_low == 0) (pol_hnd_high)++; - - SIVAL(&pol->pol_hnd.data1, 0 , 0); /* first bit must be null */ - SIVAL(&pol->pol_hnd.data2, 0 , pol_hnd_low ); /* second bit is incrementing */ - SSVAL(&pol->pol_hnd.data3, 0 , pol_hnd_high); /* second bit is incrementing */ - SSVAL(&pol->pol_hnd.data4, 0 , (pol_hnd_high>>16)); /* second bit is incrementing */ - SIVAL(pol->pol_hnd.data5, 0, time(NULL)); /* something random */ - SIVAL(pol->pol_hnd.data5, 4, sys_getpid()); /* something more random */ + pol_hnd_low++; + if (pol_hnd_low == 0) + (pol_hnd_high)++; + + SIVAL(&pol->pol_hnd.data1, 0 , 0); /* first bit must be null */ + SIVAL(&pol->pol_hnd.data2, 0 , pol_hnd_low ); /* second bit is incrementing */ + SSVAL(&pol->pol_hnd.data3, 0 , pol_hnd_high); /* second bit is incrementing */ + SSVAL(&pol->pol_hnd.data4, 0 , (pol_hnd_high>>16)); /* second bit is incrementing */ + SIVAL(pol->pol_hnd.data5, 0, time(NULL)); /* something random */ + SIVAL(pol->pol_hnd.data5, 4, sys_getpid()); /* something more random */ DLIST_ADD(p->pipe_handles->Policy, pol); p->pipe_handles->count++; diff --git a/source/rpc_server/srv_reg_nt.c b/source/rpc_server/srv_reg_nt.c index 5901a783b92..ad47fe2d4e7 100644 --- a/source/rpc_server/srv_reg_nt.c +++ b/source/rpc_server/srv_reg_nt.c @@ -27,10 +27,9 @@ #include "includes.h" -struct reg_info -{ - /* for use by \PIPE\winreg */ - fstring name; /* name of registry key */ +struct reg_info { + /* for use by \PIPE\winreg */ + fstring name; /* name of registry key */ }; static void free_reg_info(void *ptr) @@ -124,7 +123,7 @@ NTSTATUS _reg_info(pipes_struct *p, REG_Q_INFO *q_u, REG_R_INFO *r_u) DEBUG(5,("_reg_info: %d\n", __LINE__)); - if (find_policy_by_hnd(p, &q_u->pol, NULL) == -1) + if (!find_policy_by_hnd(p, &q_u->pol, NULL)) return NT_STATUS_INVALID_HANDLE; rpcstr_pull(name, q_u->uni_type.buffer, sizeof(name), q_u->uni_type.uni_str_len*2, 0); diff --git a/source/rpc_server/srv_spoolss_nt.c b/source/rpc_server/srv_spoolss_nt.c index bdd2bbf31bf..cffd88c3aa1 100644 --- a/source/rpc_server/srv_spoolss_nt.c +++ b/source/rpc_server/srv_spoolss_nt.c @@ -316,7 +316,7 @@ static WERROR delete_printer_handle(pipes_struct *p, POLICY_HND *hnd) } return WERR_OK; -} +} /**************************************************************************** return the snum of a printer corresponding to an handle |