diff options
author | Volker Lendecke <vl@samba.org> | 2008-07-11 17:45:16 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-07-11 17:53:25 +0200 |
commit | 0439d4ba61e1d9380e160a16f3c301fdb0354523 (patch) | |
tree | c81db2807fb6ba2ca0039a129d6d26f81a89b0f3 /source3/winbindd/idmap_tdb2.c | |
parent | f7ee7d2fe96658aa102e94a7606ca8c1c52cae25 (diff) | |
download | samba-0439d4ba61e1d9380e160a16f3c301fdb0354523.tar.gz samba-0439d4ba61e1d9380e160a16f3c301fdb0354523.tar.bz2 samba-0439d4ba61e1d9380e160a16f3c301fdb0354523.zip |
Revert "Fix nonempty whitespace only lines"
This reverts commit cc77db2acbc35cea58576f1e28c7a760a5e31609.
(This used to be commit ed5b516c2027d78011cdaa7cbbc01bb01e766381)
Diffstat (limited to 'source3/winbindd/idmap_tdb2.c')
-rw-r--r-- | source3/winbindd/idmap_tdb2.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/source3/winbindd/idmap_tdb2.c b/source3/winbindd/idmap_tdb2.c index b8049d00e5..ab89e615f7 100644 --- a/source3/winbindd/idmap_tdb2.c +++ b/source3/winbindd/idmap_tdb2.c @@ -15,17 +15,17 @@ Copyright (C) Jim McDonough <jmcd@us.ibm.com> 2003 Copyright (C) Jeremy Allison 2006 Copyright (C) Simo Sorce 2003-2006 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. @@ -88,7 +88,7 @@ static NTSTATUS idmap_tdb2_alloc_load(void); static NTSTATUS idmap_tdb2_open_perm_db(void) { char *db_path; - + if (idmap_tdb2_perm) { /* its already open */ return NT_STATUS_OK; @@ -281,7 +281,7 @@ static NTSTATUS idmap_tdb2_allocate_id(struct unixid *xid) hwmtype, (unsigned long)high_hwm)); return NT_STATUS_UNSUCCESSFUL; } - + xid->id = hwm; DEBUG(10,("New %s = %d\n", hwmtype, hwm)); @@ -384,7 +384,7 @@ static TDB_DATA tdb2_fetch_bystring(TALLOC_CTX *mem_ctx, const char *keystr) } return ret; } - + status = idmap_tdb2_open_perm_db(); if (!NT_STATUS_IS_OK(status)) { return ret; @@ -570,7 +570,7 @@ static NTSTATUS idmap_tdb2_id_to_sid(struct idmap_tdb2_context *ctx, struct id_m case ID_TYPE_UID: keystr = talloc_asprintf(ctx, "UID %lu", (unsigned long)map->xid.id); break; - + case ID_TYPE_GID: keystr = talloc_asprintf(ctx, "GID %lu", (unsigned long)map->xid.id); break; @@ -621,7 +621,7 @@ static NTSTATUS idmap_tdb2_id_to_sid(struct idmap_tdb2_context *ctx, struct id_m } goto done; } - + if (!string_to_sid(map->sid, (const char *)data.dptr)) { DEBUG(10,("INVALID SID (%s) in record %s\n", (const char *)data.dptr, keystr)); @@ -667,7 +667,7 @@ static NTSTATUS idmap_tdb2_sid_to_id(struct idmap_tdb2_context *ctx, struct id_m ret = NT_STATUS_NONE_MAPPED; goto done; } - + ret = idmap_tdb2_script(ctx, map, "SIDTOID %s", keystr); /* store it on shared storage */ if (!NT_STATUS_IS_OK(ret)) { @@ -702,7 +702,7 @@ static NTSTATUS idmap_tdb2_sid_to_id(struct idmap_tdb2_context *ctx, struct id_m DEBUG(2, ("Found INVALID record %s -> %s\n", keystr, (const char *)data.dptr)); ret = NT_STATUS_INTERNAL_DB_ERROR; } - + /* apply filters before returning result */ if ((ctx->filter_low_id && (map->xid.id < ctx->filter_low_id)) || (ctx->filter_high_id && (map->xid.id > ctx->filter_high_id))) { @@ -746,7 +746,7 @@ static NTSTATUS idmap_tdb2_unixids_to_sids(struct idmap_domain *dom, struct id_m ids[i]->status = ID_UNMAPPED; continue; } - + /* some fatal error occurred, return immediately */ goto done; } @@ -791,7 +791,7 @@ static NTSTATUS idmap_tdb2_sids_to_unixids(struct idmap_domain *dom, struct id_m ids[i]->status = ID_UNMAPPED; continue; } - + /* some fatal error occurred, return immediately */ goto done; } @@ -835,7 +835,7 @@ static NTSTATUS idmap_tdb2_set_mapping(struct idmap_domain *dom, const struct id data.dptr = NULL; /* TODO: should we filter a set_mapping using low/high filters ? */ - + ctx = talloc_get_type(dom->private_data, struct idmap_tdb2_context); switch (map->xid.type) { @@ -843,7 +843,7 @@ static NTSTATUS idmap_tdb2_set_mapping(struct idmap_domain *dom, const struct id case ID_TYPE_UID: kidstr = talloc_asprintf(ctx, "UID %lu", (unsigned long)map->xid.id); break; - + case ID_TYPE_GID: kidstr = talloc_asprintf(ctx, "GID %lu", (unsigned long)map->xid.id); break; |