summaryrefslogtreecommitdiffstats
path: root/source/rpc_server/srv_lsa_hnd.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-02-28 14:35:26 +0000
committerGerald Carter <jerry@samba.org>2007-02-28 14:35:26 +0000
commit80236f0d60ce013134c1ed5422d148e541f70a4f (patch)
treef71326fa71c0323e6b5d87b75b289d0608480f87 /source/rpc_server/srv_lsa_hnd.c
parentf05f5dce39b11e937fb19270b7bcc888582edf35 (diff)
downloadsamba-80236f0d60ce013134c1ed5422d148e541f70a4f.tar.gz
samba-80236f0d60ce013134c1ed5422d148e541f70a4f.tar.xz
samba-80236f0d60ce013134c1ed5422d148e541f70a4f.zip
r21585: Start syncing the monster that will become 3.0.25pre1
Still todo: * release notes * few minor outstanding patches * additional idmap man pages
Diffstat (limited to 'source/rpc_server/srv_lsa_hnd.c')
-rw-r--r--source/rpc_server/srv_lsa_hnd.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/rpc_server/srv_lsa_hnd.c b/source/rpc_server/srv_lsa_hnd.c
index 7da87d5b93d..88c59ee8952 100644
--- a/source/rpc_server/srv_lsa_hnd.c
+++ b/source/rpc_server/srv_lsa_hnd.c
@@ -103,6 +103,7 @@ BOOL create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *)
{
static uint32 pol_hnd_low = 0;
static uint32 pol_hnd_high = 0;
+ time_t t = time(NULL);
struct policy *pol;
@@ -127,12 +128,17 @@ BOOL create_policy_hnd(pipes_struct *p, POLICY_HND *hnd, void (*free_fn)(void *)
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 */
+ SIVAL(&pol->pol_hnd.handle_type, 0 , 0); /* first bit must be null */
+ SIVAL(&pol->pol_hnd.uuid.time_low, 0 , pol_hnd_low ); /* second bit is incrementing */
+ SSVAL(&pol->pol_hnd.uuid.time_mid, 0 , pol_hnd_high); /* second bit is incrementing */
+ SSVAL(&pol->pol_hnd.uuid.time_hi_and_version, 0 , (pol_hnd_high>>16)); /* second bit is incrementing */
+
+ /* split the current time into two 16 bit values */
+
+ SSVAL(pol->pol_hnd.uuid.clock_seq, 0, (t>>16)); /* something random */
+ SSVAL(pol->pol_hnd.uuid.node, 0, t); /* something random */
+
+ SIVAL(pol->pol_hnd.uuid.node, 2, sys_getpid()); /* something more random */
DLIST_ADD(p->pipe_handles->Policy, pol);
p->pipe_handles->count++;