Author: jerry
Date: 2005-04-26 14:49:11 +0000 (Tue, 26 Apr 2005)
New Revision: 6492

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6492

Log:
merge Olaf's fixes from the 3.0 tree
Modified:
   trunk/source/printing/printing.c
   trunk/source/rpc_parse/parse_spoolss.c
   trunk/source/utils/net_groupmap.c


Changeset:
Modified: trunk/source/printing/printing.c
===================================================================
--- trunk/source/printing/printing.c    2005-04-26 14:42:48 UTC (rev 6491)
+++ trunk/source/printing/printing.c    2005-04-26 14:49:11 UTC (rev 6492)
@@ -67,6 +67,7 @@
        uint16 rap_jobid;
        TDB_DATA data, key;
        struct rap_jobid_key jinfo;
+       uint8 buf[2];
 
        DEBUG(10,("pjobid_to_rap: called.\n"));
 
@@ -96,7 +97,8 @@
        rap_jobid = ++next_rap_jobid;
        if (rap_jobid == 0)
                rap_jobid = ++next_rap_jobid;
-       data.dptr = (char *)&rap_jobid;
+       SSVAL(buf,0,rap_jobid);
+       data.dptr = buf;
        data.dsize = sizeof(rap_jobid);
        tdb_store(rap_tdb, key, data, TDB_REPLACE);
        tdb_store(rap_tdb, data, key, TDB_REPLACE);
@@ -109,13 +111,15 @@
 BOOL rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid)
 {
        TDB_DATA data, key;
+       uint8 buf[2];
 
        DEBUG(10,("rap_to_pjobid called.\n"));
 
        if (!rap_tdb)
                return False;
 
-       key.dptr = (char *)&rap_jobid;
+       SSVAL(buf,0,rap_jobid);
+       key.dptr = buf;
        key.dsize = sizeof(rap_jobid);
        data = tdb_fetch(rap_tdb, key);
        if ( data.dptr && data.dsize == sizeof(struct rap_jobid_key) ) 
@@ -140,6 +144,7 @@
        TDB_DATA key, data;
        uint16 rap_jobid;
        struct rap_jobid_key jinfo;
+       uint8 buf[2];
 
        DEBUG(10,("rap_jobid_delete: called.\n"));
 
@@ -165,7 +170,8 @@
 
        rap_jobid = SVAL(data.dptr, 0);
        SAFE_FREE(data.dptr);
-       data.dptr = (char *)&rap_jobid;
+       SSVAL(buf,0,rap_jobid);
+       data.dptr=buf;
        data.dsize = sizeof(rap_jobid);
        tdb_delete(rap_tdb, key);
        tdb_delete(rap_tdb, data);

Modified: trunk/source/rpc_parse/parse_spoolss.c
===================================================================
--- trunk/source/rpc_parse/parse_spoolss.c      2005-04-26 14:42:48 UTC (rev 
6491)
+++ trunk/source/rpc_parse/parse_spoolss.c      2005-04-26 14:49:11 UTC (rev 
6492)
@@ -911,7 +911,8 @@
 
        q_u->user_switch = 1;
        
-       q_u->user_ctr.level           = 1;
+       q_u->user_ctr.level                 = 1;
+       q_u->user_ctr.user.user1            = TALLOC_P( get_talloc_ctx(), 
SPOOL_USER_1 );
        q_u->user_ctr.user.user1->size      = strlen(clientname) + 
strlen(user_name) + 10;
        q_u->user_ctr.user.user1->build     = 1381;
        q_u->user_ctr.user.user1->major     = 2;

Modified: trunk/source/utils/net_groupmap.c
===================================================================
--- trunk/source/utils/net_groupmap.c   2005-04-26 14:42:48 UTC (rev 6491)
+++ trunk/source/utils/net_groupmap.c   2005-04-26 14:49:11 UTC (rev 6492)
@@ -3,7 +3,8 @@
  *  RPC Pipe client / server routines
  *  Copyright (C) Andrew Tridgell              1992-2000,
  *  Copyright (C) Jean François Micouleau      1998-2001.
- *  Copyright (C) Gerald Carter                2003.
+ *  Copyright (C) Gerald Carter                2003,
+ *  Copyright (C) Volker Lendecke              2004
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by

Reply via email to