Changeset 745 for trunk/server/source3/passdb/pdb_compat.c
- Timestamp:
- Nov 27, 2012, 4:43:17 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 581,587,591,594,597,600,615,618,740
- Property svn:mergeinfo changed
-
trunk/server/source3/passdb/pdb_compat.c
r414 r745 7 7 Copyright (C) Andrew Bartlett 2001-2002 8 8 Copyright (C) Stefan (metze) Metzmacher 2002 9 9 10 10 This program is free software; you can redistribute it and/or modify 11 11 it under the terms of the GNU General Public License as published by 12 12 the Free Software Foundation; either version 3 of the License, or 13 13 (at your option) any later version. 14 14 15 15 This program is distributed in the hope that it will be useful, 16 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 18 GNU General Public License for more details. 19 19 20 20 You should have received a copy of the GNU General Public License 21 21 along with this program. If not, see <http://www.gnu.org/licenses/>. … … 23 23 24 24 #include "includes.h" 25 #include "passdb.h" 26 #include "../libcli/security/security.h" 25 27 26 28 #undef DBGC_CLASS … … 34 36 if (sid_peek_check_rid(get_global_sam_sid(), pdb_get_user_sid(sampass),&u_rid)) 35 37 return u_rid; 36 38 37 39 return (0); 38 40 } … … 50 52 bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value_state flag) 51 53 { 52 DOM_SIDu_sid;53 const DOM_SID*global_sam_sid;54 54 struct dom_sid u_sid; 55 const struct dom_sid *global_sam_sid; 56 55 57 if (!sampass) 56 58 return False; … … 61 63 } 62 64 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)) { 66 66 return False; 67 } 67 68 68 69 if (!pdb_set_user_sid(sampass, &u_sid, flag)) … … 77 78 bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32 grid, enum pdb_value_state flag) 78 79 { 79 DOM_SIDg_sid;80 const DOM_SID*global_sam_sid;80 struct dom_sid g_sid; 81 const struct dom_sid *global_sam_sid; 81 82 82 83 if (!sampass) 83 84 return False; 84 85 85 86 if (!(global_sam_sid = get_global_sam_sid())) { 86 87 DEBUG(1, ("pdb_set_user_sid_from_rid: Could not read global sam sid!\n")); … … 88 89 } 89 90 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)) { 93 92 return False; 93 } 94 94 95 95 if (!pdb_set_group_sid(sampass, &g_sid, flag))
Note:
See TracChangeset
for help on using the changeset viewer.