Copyright (C) Gerald (Jerry) Carter 2007
-
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
/* Required Headers */
+#include "replace.h"
#include "libwbclient.h"
/* Convert a Windows SID to a Unix uid, allocating an uid if needed */
return wbc_status;
}
+
/* Convert a Windows SID to a Unix gid if there already is a mapping */
wbcErr wbcQuerySidToGid(const struct wbcDomainSid *sid,
return WBC_ERR_NOT_IMPLEMENTED;
}
+
/* Convert a Unix gid to a Windows SID, allocating a SID if needed */
wbcErr wbcGidToSid(gid_t gid, struct wbcDomainSid *sid)
{
/* Make request */
- wbc_status = wbcRequestResponse(WINBINDD_ALLOCATE_UID,
- &request, &response);
+ wbc_status = wbcRequestResponsePriv(WINBINDD_ALLOCATE_UID,
+ &request, &response);
BAIL_ON_WBC_ERROR(wbc_status);
/* Copy out result */
/* Make request */
- wbc_status = wbcRequestResponse(WINBINDD_ALLOCATE_GID,
- &request, &response);
+ wbc_status = wbcRequestResponsePriv(WINBINDD_ALLOCATE_GID,
+ &request, &response);
BAIL_ON_WBC_ERROR(wbc_status);
/* Copy out result */
sizeof(request.data.dual_idmapset.sid)-1);
wbcFreeMemory(sid_string);
- wbc_status = wbcRequestResponse(WINBINDD_SET_MAPPING,
- &request, &response);
+ wbc_status = wbcRequestResponsePriv(WINBINDD_SET_MAPPING,
+ &request, &response);
BAIL_ON_WBC_ERROR(wbc_status);
done:
sizeof(request.data.dual_idmapset.sid)-1);
wbcFreeMemory(sid_string);
- wbc_status = wbcRequestResponse(WINBINDD_SET_MAPPING,
- &request, &response);
+ wbc_status = wbcRequestResponsePriv(WINBINDD_SET_MAPPING,
+ &request, &response);
BAIL_ON_WBC_ERROR(wbc_status);
done:
sizeof(request.data.dual_idmapset.sid)-1);
wbcFreeMemory(sid_string);
- wbc_status = wbcRequestResponse(WINBINDD_REMOVE_MAPPING,
- &request, &response);
+ wbc_status = wbcRequestResponsePriv(WINBINDD_REMOVE_MAPPING,
+ &request, &response);
BAIL_ON_WBC_ERROR(wbc_status);
done:
sizeof(request.data.dual_idmapset.sid)-1);
wbcFreeMemory(sid_string);
- wbc_status = wbcRequestResponse(WINBINDD_REMOVE_MAPPING,
- &request, &response);
+ wbc_status = wbcRequestResponsePriv(WINBINDD_REMOVE_MAPPING,
+ &request, &response);
BAIL_ON_WBC_ERROR(wbc_status);
done:
return wbc_status;
}
-/* Set the highwater mark for allocated uids. */
+/* Set the highwater mark for allocated uids - not implemented any more */
wbcErr wbcSetUidHwm(uid_t uid_hwm)
{
- struct winbindd_request request;
- struct winbindd_response response;
- wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
-
- /* Initialise request */
-
- ZERO_STRUCT(request);
- ZERO_STRUCT(response);
-
- /* Make request */
-
- request.data.dual_idmapset.id = uid_hwm;
- request.data.dual_idmapset.type = _ID_TYPE_UID;
-
- wbc_status = wbcRequestResponse(WINBINDD_SET_HWM,
- &request, &response);
- BAIL_ON_WBC_ERROR(wbc_status);
-
- done:
- return wbc_status;
+ return WBC_ERR_NOT_IMPLEMENTED;
}
/* Set the highwater mark for allocated gids. */
request.data.dual_idmapset.id = gid_hwm;
request.data.dual_idmapset.type = _ID_TYPE_GID;
- wbc_status = wbcRequestResponse(WINBINDD_SET_HWM,
- &request, &response);
+ wbc_status = wbcRequestResponsePriv(WINBINDD_SET_HWM,
+ &request, &response);
BAIL_ON_WBC_ERROR(wbc_status);
done: