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
14 #include <afs/param.h>
18 #include "TaAfsAdmSvrClientInternal.h"
22 * ROUTINES ___________________________________________________________________
26 BOOL ADMINAPI
asc_GroupChange (UINT_PTR idClient
, ASID idCell
, ASID idGroup
, LPAFSADMSVR_CHANGEGROUP_PARAMS pChange
, ULONG
*pStatus
)
33 if ((rc
= AfsAdmSvr_ChangeGroup (idClient
, idCell
, idGroup
, pChange
, &status
)) != FALSE
)
35 // If we succeeded in changing this group's properties, get the
36 // newest values for our cache.
39 rc
= asc_ObjectPropertiesGet (idClient
, GET_ALL_DATA
, idCell
, idGroup
, &Properties
, &status
);
45 status
= RPC_S_CALL_FAILED_DNE
;
55 BOOL ADMINAPI
asc_GroupMembersGet (UINT_PTR idClient
, ASID idCell
, ASID idGroup
, LPASIDLIST
*ppAsidList
, ULONG
*pStatus
)
62 rc
= AfsAdmSvr_GetGroupMembers (idClient
, idCell
, idGroup
, ppAsidList
, &status
);
67 status
= RPC_S_CALL_FAILED_DNE
;
77 BOOL ADMINAPI
asc_GroupMemberAdd (UINT_PTR idClient
, ASID idCell
, ASID idGroup
, ASID idMember
, ULONG
*pStatus
)
84 rc
= AfsAdmSvr_AddGroupMember (idClient
, idCell
, idGroup
, idMember
, &status
);
89 status
= RPC_S_CALL_FAILED_DNE
;
99 BOOL ADMINAPI
asc_GroupMemberRemove (UINT_PTR idClient
, ASID idCell
, ASID idGroup
, ASID idMember
, ULONG
*pStatus
)
106 rc
= AfsAdmSvr_RemoveGroupMember (idClient
, idCell
, idGroup
, idMember
, &status
);
111 status
= RPC_S_CALL_FAILED_DNE
;
121 BOOL ADMINAPI
asc_GroupRename (UINT_PTR idClient
, ASID idCell
, ASID idGroup
, LPCTSTR pszNewName
, ULONG
*pStatus
)
128 STRING szNewName
= TEXT("");
130 lstrcpy (szNewName
, pszNewName
);
131 if ((rc
= AfsAdmSvr_RenameGroup (idClient
, idCell
, idGroup
, szNewName
, &status
)) == TRUE
)
133 // If we succeeded in changing this group's name, get the
134 // newest group properties for our cache.
136 ASOBJPROP Properties
;
137 rc
= asc_ObjectPropertiesGet (idClient
, GET_ALL_DATA
, idCell
, idGroup
, &Properties
, &status
);
143 status
= RPC_S_CALL_FAILED_DNE
;
153 BOOL ADMINAPI
asc_GroupMembershipGet (UINT_PTR idClient
, ASID idCell
, ASID idMember
, LPASIDLIST
*ppAsidList
, ULONG
*pStatus
)
160 rc
= AfsAdmSvr_GetGroupMembership (idClient
, idCell
, idMember
, ppAsidList
, &status
);
165 status
= RPC_S_CALL_FAILED_DNE
;
175 BOOL ADMINAPI
asc_GroupOwnershipGet (UINT_PTR idClient
, ASID idCell
, ASID idOwner
, LPASIDLIST
*ppAsidList
, ULONG
*pStatus
)
182 rc
= AfsAdmSvr_GetGroupOwnership (idClient
, idCell
, idOwner
, ppAsidList
, &status
);
187 status
= RPC_S_CALL_FAILED_DNE
;
197 BOOL ADMINAPI
asc_GroupCreate (UINT_PTR idClient
, ASID idCell
, LPAFSADMSVR_CREATEGROUP_PARAMS pCreate
, ASID
*pidGroup
, ULONG
*pStatus
)
204 if ((rc
= AfsAdmSvr_CreateGroup (idClient
, idCell
, pCreate
, pidGroup
, &status
)) == TRUE
)
206 // If we succeeded in creating this group, get the
207 // initial group properties for our cache.
209 ASOBJPROP Properties
;
210 rc
= asc_ObjectPropertiesGet (idClient
, GET_ALL_DATA
, idCell
, *pidGroup
, &Properties
, &status
);
216 status
= RPC_S_CALL_FAILED_DNE
;
226 BOOL ADMINAPI
asc_GroupDelete (UINT_PTR idClient
, ASID idCell
, ASID idGroup
, ULONG
*pStatus
)
233 if ((rc
= AfsAdmSvr_DeleteGroup (idClient
, idCell
, idGroup
, &status
)) == TRUE
)
235 // If we succeeded in deleting this group, clean up our cache.
236 // Expect this call to fail (the group's deleted, right?)
238 ASOBJPROP Properties
;
240 (void)asc_ObjectPropertiesGet (idClient
, GET_ALL_DATA
, idCell
, idGroup
, &Properties
, &dummy
);
246 status
= RPC_S_CALL_FAILED_DNE
;