mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
lib: Fix some whitespace
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
5a03c42af4
commit
5f2c6360bb
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
Winbind Utility functions
|
||||
|
||||
@ -71,16 +71,16 @@ bool winbind_lookup_name(const char *dom_name, const char *name, struct dom_sid
|
||||
{
|
||||
struct wbcDomainSid dom_sid;
|
||||
wbcErr result;
|
||||
enum wbcSidType type;
|
||||
enum wbcSidType type;
|
||||
|
||||
result = wbcLookupName(dom_name, name, &dom_sid, &type);
|
||||
if (result != WBC_ERR_SUCCESS)
|
||||
return false;
|
||||
|
||||
memcpy(sid, &dom_sid, sizeof(struct dom_sid));
|
||||
*name_type = (enum lsa_SidType)type;
|
||||
*name_type = (enum lsa_SidType)type;
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Call winbindd to convert sid to name */
|
||||
@ -95,7 +95,7 @@ bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
|
||||
char *domain_name = NULL;
|
||||
char *account_name = NULL;
|
||||
|
||||
memcpy(&dom_sid, sid, sizeof(dom_sid));
|
||||
memcpy(&dom_sid, sid, sizeof(dom_sid));
|
||||
|
||||
result = wbcLookupSid(&dom_sid, &domain_name, &account_name, &type);
|
||||
if (result != WBC_ERR_SUCCESS)
|
||||
@ -103,7 +103,7 @@ bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
|
||||
|
||||
/* Copy out result */
|
||||
|
||||
if (domain) {
|
||||
if (domain) {
|
||||
*domain = talloc_strdup(mem_ctx, domain_name);
|
||||
}
|
||||
if (name) {
|
||||
@ -111,16 +111,16 @@ bool winbind_lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
|
||||
}
|
||||
*name_type = (enum lsa_SidType)type;
|
||||
|
||||
DEBUG(10, ("winbind_lookup_sid: SUCCESS: SID %s -> %s %s\n",
|
||||
DEBUG(10, ("winbind_lookup_sid: SUCCESS: SID %s -> %s %s\n",
|
||||
sid_string_dbg(sid), domain_name, account_name));
|
||||
|
||||
wbcFreeMemory(domain_name);
|
||||
wbcFreeMemory(account_name);
|
||||
|
||||
if ((domain && !*domain) || (name && !*name)) {
|
||||
if ((domain && !*domain) || (name && !*name)) {
|
||||
DEBUG(0,("winbind_lookup_sid: talloc() failed!\n"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
@ -142,11 +142,11 @@ bool winbind_sid_to_uid(uid_t *puid, const struct dom_sid *sid)
|
||||
struct wbcDomainSid dom_sid;
|
||||
wbcErr result;
|
||||
|
||||
memcpy(&dom_sid, sid, sizeof(dom_sid));
|
||||
memcpy(&dom_sid, sid, sizeof(dom_sid));
|
||||
|
||||
result = wbcSidToUid(&dom_sid, puid);
|
||||
result = wbcSidToUid(&dom_sid, puid);
|
||||
|
||||
return (result == WBC_ERR_SUCCESS);
|
||||
return (result == WBC_ERR_SUCCESS);
|
||||
}
|
||||
|
||||
/* Call winbindd to convert uid to sid */
|
||||
@ -173,11 +173,11 @@ bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid)
|
||||
struct wbcDomainSid dom_sid;
|
||||
wbcErr result;
|
||||
|
||||
memcpy(&dom_sid, sid, sizeof(dom_sid));
|
||||
memcpy(&dom_sid, sid, sizeof(dom_sid));
|
||||
|
||||
result = wbcSidToGid(&dom_sid, pgid);
|
||||
result = wbcSidToGid(&dom_sid, pgid);
|
||||
|
||||
return (result == WBC_ERR_SUCCESS);
|
||||
return (result == WBC_ERR_SUCCESS);
|
||||
}
|
||||
|
||||
/* Call winbindd to convert gid to sid */
|
||||
@ -210,7 +210,7 @@ wbcErr wb_is_trusted_domain(const char *domain)
|
||||
wbcFreeMemory(info);
|
||||
}
|
||||
|
||||
return result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Lookup a set of rids in a given domain */
|
||||
@ -226,15 +226,15 @@ bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
|
||||
enum wbcSidType *name_types = NULL;
|
||||
struct wbcDomainSid dom_sid;
|
||||
wbcErr ret;
|
||||
int i;
|
||||
int i;
|
||||
|
||||
memcpy(&dom_sid, domain_sid, sizeof(struct wbcDomainSid));
|
||||
|
||||
ret = wbcLookupRids(&dom_sid, num_rids, rids,
|
||||
&dom_name, &namelist, &name_types);
|
||||
if (ret != WBC_ERR_SUCCESS) {
|
||||
if (ret != WBC_ERR_SUCCESS) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
*domain_name = talloc_strdup(mem_ctx, dom_name);
|
||||
*names = talloc_array(mem_ctx, const char*, num_rids);
|
||||
@ -249,7 +249,7 @@ bool winbind_lookup_rids(TALLOC_CTX *mem_ctx,
|
||||
wbcFreeMemory(namelist);
|
||||
wbcFreeMemory(name_types);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Ask Winbind to allocate a new uid for us */
|
||||
@ -428,7 +428,7 @@ bool winbind_uid_to_sid(struct dom_sid *sid, uid_t uid)
|
||||
|
||||
bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid)
|
||||
{
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Call winbindd to convert gid to sid */
|
||||
|
Loading…
Reference in New Issue
Block a user