2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 #include <afs/param.h>
15 #include "TaAfsAdmSvrClientInternal.h"
19 * ROUTINES ___________________________________________________________________
23 BOOL ADMINAPI asc_GroupChange (DWORD idClient, ASID idCell, ASID idGroup, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange, ULONG *pStatus)
30 if ((rc = AfsAdmSvr_ChangeGroup (idClient, idCell, idGroup, pChange, &status)) != FALSE)
32 // If we succeeded in changing this group's properties, get the
33 // newest values for our cache.
36 rc = asc_ObjectPropertiesGet (idClient, GET_ALL_DATA, idCell, idGroup, &Properties, &status);
42 status = RPC_S_CALL_FAILED_DNE;
52 BOOL ADMINAPI asc_GroupMembersGet (DWORD idClient, ASID idCell, ASID idGroup, LPASIDLIST *ppAsidList, ULONG *pStatus)
59 rc = AfsAdmSvr_GetGroupMembers (idClient, idCell, idGroup, ppAsidList, &status);
64 status = RPC_S_CALL_FAILED_DNE;
74 BOOL ADMINAPI asc_GroupMemberAdd (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
81 rc = AfsAdmSvr_AddGroupMember (idClient, idCell, idGroup, idMember, &status);
86 status = RPC_S_CALL_FAILED_DNE;
96 BOOL ADMINAPI asc_GroupMemberRemove (DWORD idClient, ASID idCell, ASID idGroup, ASID idMember, ULONG *pStatus)
103 rc = AfsAdmSvr_RemoveGroupMember (idClient, idCell, idGroup, idMember, &status);
108 status = RPC_S_CALL_FAILED_DNE;
118 BOOL ADMINAPI asc_GroupRename (DWORD idClient, ASID idCell, ASID idGroup, LPCTSTR pszNewName, ULONG *pStatus)
125 STRING szNewName = TEXT("");
127 lstrcpy (szNewName, pszNewName);
128 if ((rc = AfsAdmSvr_RenameGroup (idClient, idCell, idGroup, szNewName, &status)) == TRUE)
130 // If we succeeded in changing this group's name, get the
131 // newest group properties for our cache.
133 ASOBJPROP Properties;
134 rc = asc_ObjectPropertiesGet (idClient, GET_ALL_DATA, idCell, idGroup, &Properties, &status);
140 status = RPC_S_CALL_FAILED_DNE;
150 BOOL ADMINAPI asc_GroupMembershipGet (DWORD idClient, ASID idCell, ASID idMember, LPASIDLIST *ppAsidList, ULONG *pStatus)
157 rc = AfsAdmSvr_GetGroupMembership (idClient, idCell, idMember, ppAsidList, &status);
162 status = RPC_S_CALL_FAILED_DNE;
172 BOOL ADMINAPI asc_GroupOwnershipGet (DWORD idClient, ASID idCell, ASID idOwner, LPASIDLIST *ppAsidList, ULONG *pStatus)
179 rc = AfsAdmSvr_GetGroupOwnership (idClient, idCell, idOwner, ppAsidList, &status);
184 status = RPC_S_CALL_FAILED_DNE;
194 BOOL ADMINAPI asc_GroupCreate (DWORD idClient, ASID idCell, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate, ASID *pidGroup, ULONG *pStatus)
201 if ((rc = AfsAdmSvr_CreateGroup (idClient, idCell, pCreate, pidGroup, &status)) == TRUE)
203 // If we succeeded in creating this group, get the
204 // initial group properties for our cache.
206 ASOBJPROP Properties;
207 rc = asc_ObjectPropertiesGet (idClient, GET_ALL_DATA, idCell, *pidGroup, &Properties, &status);
213 status = RPC_S_CALL_FAILED_DNE;
223 BOOL ADMINAPI asc_GroupDelete (DWORD idClient, ASID idCell, ASID idGroup, ULONG *pStatus)
230 if ((rc = AfsAdmSvr_DeleteGroup (idClient, idCell, idGroup, &status)) == TRUE)
232 // If we succeeded in deleting this group, clean up our cache.
233 // Expect this call to fail (the group's deleted, right?)
235 ASOBJPROP Properties;
237 (void)asc_ObjectPropertiesGet (idClient, GET_ALL_DATA, idCell, idGroup, &Properties, &dummy);
243 status = RPC_S_CALL_FAILED_DNE;