Ignore:
Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/passdb/pdb_compat.c

    r414 r745  
    77   Copyright (C) Andrew Bartlett                2001-2002
    88   Copyright (C) Stefan (metze) Metzmacher      2002
    9      
     9
    1010   This program is free software; you can redistribute it and/or modify
    1111   it under the terms of the GNU General Public License as published by
    1212   the Free Software Foundation; either version 3 of the License, or
    1313   (at your option) any later version.
    14    
     14
    1515   This program is distributed in the hope that it will be useful,
    1616   but WITHOUT ANY WARRANTY; without even the implied warranty of
    1717   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1818   GNU General Public License for more details.
    19    
     19
    2020   You should have received a copy of the GNU General Public License
    2121   along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2323
    2424#include "includes.h"
     25#include "passdb.h"
     26#include "../libcli/security/security.h"
    2527
    2628#undef DBGC_CLASS
     
    3436                if (sid_peek_check_rid(get_global_sam_sid(), pdb_get_user_sid(sampass),&u_rid))
    3537                        return u_rid;
    36        
     38
    3739        return (0);
    3840}
     
    5052bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value_state flag)
    5153{
    52         DOM_SID u_sid;
    53         const DOM_SID *global_sam_sid;
    54        
     54        struct dom_sid u_sid;
     55        const struct dom_sid *global_sam_sid;
     56
    5557        if (!sampass)
    5658                return False;
     
    6163        }
    6264
    63         sid_copy(&u_sid, global_sam_sid);
    64 
    65         if (!sid_append_rid(&u_sid, rid))
     65        if (!sid_compose(&u_sid, global_sam_sid, rid)) {
    6666                return False;
     67        }
    6768
    6869        if (!pdb_set_user_sid(sampass, &u_sid, flag))
     
    7778bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32 grid, enum pdb_value_state flag)
    7879{
    79         DOM_SID g_sid;
    80         const DOM_SID *global_sam_sid;
     80        struct dom_sid g_sid;
     81        const struct dom_sid *global_sam_sid;
    8182
    8283        if (!sampass)
    8384                return False;
    84        
     85
    8586        if (!(global_sam_sid = get_global_sam_sid())) {
    8687                DEBUG(1, ("pdb_set_user_sid_from_rid: Could not read global sam sid!\n"));
     
    8889        }
    8990
    90         sid_copy(&g_sid, global_sam_sid);
    91        
    92         if (!sid_append_rid(&g_sid, grid))
     91        if (!sid_compose(&g_sid, global_sam_sid, grid)) {
    9392                return False;
     93        }
    9494
    9595        if (!pdb_set_group_sid(sampass, &g_sid, flag))
Note: See TracChangeset for help on using the changeset viewer.