diff options
author | Volker Lendecke <vl@samba.org> | 2011-02-26 12:36:19 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-02-27 19:27:44 +0100 |
commit | 32731db56f6e99fe5c5febb251a00ad9e194081f (patch) | |
tree | 5cd6ea2bef16ba13687fa9ff7de1f33051724e2d /source3 | |
parent | 2c9c8fa036645b8705c281fc5a104373dcee8f27 (diff) | |
download | samba-32731db56f6e99fe5c5febb251a00ad9e194081f.tar.gz samba-32731db56f6e99fe5c5febb251a00ad9e194081f.tar.bz2 samba-32731db56f6e99fe5c5febb251a00ad9e194081f.zip |
s3: Fix some nonempty blank lines
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libads/kerberos.c | 19 | ||||
-rw-r--r-- | source3/libnet/libnet_join.c | 4 | ||||
-rw-r--r-- | source3/smbd/open.c | 19 | ||||
-rw-r--r-- | source3/winbindd/idmap_ad.c | 16 | ||||
-rw-r--r-- | source3/winbindd/idmap_hash/idmap_hash.c | 4 | ||||
-rw-r--r-- | source3/winbindd/idmap_nss.c | 12 | ||||
-rw-r--r-- | source3/winbindd/idmap_tdb.c | 18 | ||||
-rw-r--r-- | source3/winbindd/nss_info_template.c | 10 |
8 files changed, 50 insertions, 52 deletions
diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index 31af49685a..11bfb4d069 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -11,12 +11,12 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 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, see <http://www.gnu.org/licenses/>. */ @@ -192,7 +192,7 @@ int kerberos_kinit_password_ext(const char *principal, if ((code = krb5_cc_resolve(ctx, cache_name ? cache_name : krb5_cc_default_name(ctx), &cc))) { goto out; } - + if ((code = smb_krb5_parse_name(ctx, principal, &me))) { goto out; } @@ -231,7 +231,7 @@ int kerberos_kinit_password_ext(const char *principal, if ((code = krb5_cc_initialize(ctx, cc, me))) { goto out; } - + if ((code = krb5_cc_store_cred(ctx, cc, &my_creds))) { goto out; } @@ -298,7 +298,7 @@ int ads_kdestroy(const char *cc_name) error_message(code))); return code; } - + if (!cc_name) { if ((code = krb5_cc_default(ctx, &cc))) { krb5_free_context(ctx); @@ -541,11 +541,11 @@ krb5_principal kerberos_fetch_salt_princ_for_host_princ(krb5_context context, { char *unparsed_name = NULL, *salt_princ_s = NULL; krb5_principal ret_princ = NULL; - + /* lookup new key first */ if ( (salt_princ_s = kerberos_secrets_fetch_des_salt()) == NULL ) { - + /* look under the old key. If this fails, just use the standard key */ if (smb_krb5_unparse_name(talloc_tos(), context, host_princ, &unparsed_name) != 0) { @@ -560,10 +560,10 @@ krb5_principal kerberos_fetch_salt_princ_for_host_princ(krb5_context context, if (smb_krb5_parse_name(context, salt_princ_s, &ret_princ) != 0) { ret_princ = NULL; } - + TALLOC_FREE(unparsed_name); SAFE_FREE(salt_princ_s); - + return ret_princ; } @@ -604,7 +604,6 @@ bool kerberos_secrets_store_salting_principal(const char *service, if (smb_krb5_parse_name(context, princ_s, &princ) != 0) { goto out; - } if (smb_krb5_unparse_name(talloc_tos(), context, princ, &unparsed_name) != 0) { goto out; diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 22278ba55c..c2487c99f1 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -2153,7 +2153,7 @@ static WERROR libnet_DomainUnjoin(TALLOC_CTX *mem_ctx, /* for net ads leave, try to delete the account. If it works, no sense in disabling. If it fails, we can still try to disable it. jmcd */ - + if (r->in.delete_machine_account) { ADS_STATUS ads_status; ads_status = libnet_unjoin_connect_ads(mem_ctx, r); @@ -2191,7 +2191,7 @@ static WERROR libnet_DomainUnjoin(TALLOC_CTX *mem_ctx, } return ntstatus_to_werror(status); } - + r->out.disabled_machine_account = true; } diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 7735301c22..ca84f1f039 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -4,17 +4,17 @@ Copyright (C) Andrew Tridgell 1992-1998 Copyright (C) Jeremy Allison 2001-2004 Copyright (C) Volker Lendecke 2005 - + 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 3 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, see <http://www.gnu.org/licenses/>. */ @@ -714,7 +714,7 @@ sa = 0x%x, share = 0x%x\n", (num), (unsigned int)(am), (unsigned int)(right), (u share_access, FILE_SHARE_WRITE); CHECK_MASK(2, access_mask, FILE_WRITE_DATA | FILE_APPEND_DATA, entry->share_access, FILE_SHARE_WRITE); - + CHECK_MASK(3, entry->access_mask, FILE_READ_DATA | FILE_EXECUTE, share_access, FILE_SHARE_READ); CHECK_MASK(4, access_mask, FILE_READ_DATA | FILE_EXECUTE, @@ -842,7 +842,7 @@ static NTSTATUS open_mode_check(connection_struct *conn, /* * Check if the share modes will give us access. */ - + #if defined(DEVELOPER) for(i = 0; i < lck->num_share_modes; i++) { validate_my_share_entries(conn->sconn, i, @@ -868,7 +868,7 @@ static NTSTATUS open_mode_check(connection_struct *conn, return NT_STATUS_SHARING_VIOLATION; } } - + return NT_STATUS_OK; } @@ -1312,7 +1312,7 @@ bool map_open_params_to_ntcreate(const struct smb_filename *smb_fname, case OPENX_FILE_EXISTS_OPEN|OPENX_FILE_CREATE_IF_NOT_EXIST: create_disposition = FILE_OPEN_IF; break; - + case OPENX_FILE_EXISTS_TRUNCATE: create_disposition = FILE_OVERWRITE; break; @@ -1331,7 +1331,7 @@ bool map_open_params_to_ntcreate(const struct smb_filename *smb_fname, "open_func 0x%x\n", (unsigned int)open_func)); return False; } - + /* Create the NT compatible share modes. */ switch (GET_DENY_MODE(deny_mode)) { case DENY_ALL: @@ -2652,7 +2652,6 @@ static NTSTATUS open_directory(connection_struct *conn, info = FILE_WAS_OPENED; status = NT_STATUS_OK; } - break; case FILE_SUPERSEDE: @@ -2712,7 +2711,7 @@ static NTSTATUS open_directory(connection_struct *conn, /* * Setup the files_struct for it. */ - + fsp->mode = smb_dname->st.st_ex_mode; fsp->file_id = vfs_file_id_from_sbuf(conn, &smb_dname->st); fsp->vuid = req ? req->vuid : UID_FIELD_INVALID; diff --git a/source3/winbindd/idmap_ad.c b/source3/winbindd/idmap_ad.c index 32a3e17069..1d09780112 100644 --- a/source3/winbindd/idmap_ad.c +++ b/source3/winbindd/idmap_ad.c @@ -192,7 +192,7 @@ static ADS_STATUS ad_idmap_cached_connection(struct idmap_domain *dom) DEBUG(2,("ad_idmap_cached_connection: Failed to obtain schema details!\n")); } } - + return status; } @@ -305,7 +305,7 @@ static NTSTATUS idmap_ad_unixids_to_sids(struct idmap_domain *dom, struct id_map for (i = 0; ids[i]; i++) { ids[i]->status = ID_UNKNOWN; } - + /* Only do query if we are online */ if (idmap_is_offline()) { return NT_STATUS_FILE_IS_OFFLINE; @@ -348,7 +348,7 @@ again: (unsigned long)ids[idx]->xid.id); CHECK_ALLOC_DONE(u_filter); break; - + case ID_TYPE_GID: if ( ! g_filter) { g_filter = talloc_asprintf(memctx, "(&(|" @@ -557,7 +557,7 @@ again: ")(|", ATYPE_NORMAL_ACCOUNT, ATYPE_WORKSTATION_TRUST, ATYPE_INTERDOMAIN_TRUST, ATYPE_SECURITY_GLOBAL_GROUP, ATYPE_SECURITY_LOCAL_GROUP); - + CHECK_ALLOC_DONE(filter); bidx = idx; @@ -567,7 +567,7 @@ again: sidstr = ldap_encode_ndr_dom_sid(talloc_tos(), ids[idx]->sid); filter = talloc_asprintf_append_buffer(filter, "(objectSid=%s)", sidstr); - + TALLOC_FREE(sidstr); CHECK_ALLOC_DONE(filter); } @@ -700,7 +700,7 @@ static NTSTATUS idmap_ad_close(struct idmap_domain *dom) } TALLOC_FREE( ctx->ad_schema ); - + return NT_STATUS_OK; } @@ -1113,7 +1113,7 @@ static struct idmap_methods ad_methods = { /* The SFU and RFC2307 NSS plugins share everything but the init function which sets the intended schema model to use */ - + static struct nss_info_methods nss_rfc2307_methods = { .init = nss_rfc2307_init, .get_nss_info = nss_ad_get_info, @@ -1160,7 +1160,7 @@ NTSTATUS idmap_ad_init(void) if ( !NT_STATUS_IS_OK(status_idmap_ad) ) return status_idmap_ad; } - + if ( !NT_STATUS_IS_OK( status_nss_rfc2307 ) ) { status_nss_rfc2307 = smb_register_idmap_nss(SMB_NSS_INFO_INTERFACE_VERSION, "rfc2307", &nss_rfc2307_methods ); diff --git a/source3/winbindd/idmap_hash/idmap_hash.c b/source3/winbindd/idmap_hash/idmap_hash.c index c52a90f82b..da5c4e3411 100644 --- a/source3/winbindd/idmap_hash/idmap_hash.c +++ b/source3/winbindd/idmap_hash/idmap_hash.c @@ -168,7 +168,7 @@ static NTSTATUS unixids_to_sids(struct idmap_domain *dom, for (i = 0; ids[i]; i++) { ids[i]->status = ID_UNKNOWN; } - + nt_status = be_init(dom, NULL); BAIL_ON_NTSTATUS_ERROR(nt_status); @@ -218,7 +218,7 @@ static NTSTATUS sids_to_unixids(struct idmap_domain *dom, for (i = 0; ids[i]; i++) { ids[i]->status = ID_UNKNOWN; } - + nt_status = be_init(dom, NULL); BAIL_ON_NTSTATUS_ERROR(nt_status); diff --git a/source3/winbindd/idmap_nss.c b/source3/winbindd/idmap_nss.c index ac5dd797fa..84404b6344 100644 --- a/source3/winbindd/idmap_nss.c +++ b/source3/winbindd/idmap_nss.c @@ -4,17 +4,17 @@ idmap PASSDB backend Copyright (C) Simo Sorce 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 3 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, see <http://www.gnu.org/licenses/>. */ @@ -50,7 +50,7 @@ static NTSTATUS idmap_nss_unixids_to_sids(struct idmap_domain *dom, struct id_ma for (i = 0; ids[i]; i++) { ids[i]->status = ID_UNKNOWN; } - + ctx = talloc_new(dom); if ( ! ctx) { DEBUG(0, ("Out of memory!\n")); @@ -63,7 +63,7 @@ static NTSTATUS idmap_nss_unixids_to_sids(struct idmap_domain *dom, struct id_ma const char *name; enum lsa_SidType type; bool ret; - + switch (ids[i]->xid.type) { case ID_TYPE_UID: pw = getpwuid((uid_t)ids[i]->xid.id); @@ -141,7 +141,7 @@ static NTSTATUS idmap_nss_sids_to_unixids(struct idmap_domain *dom, struct id_ma for (i = 0; ids[i]; i++) { ids[i]->status = ID_UNKNOWN; } - + ctx = talloc_new(dom); if ( ! ctx) { DEBUG(0, ("Out of memory!\n")); diff --git a/source3/winbindd/idmap_tdb.c b/source3/winbindd/idmap_tdb.c index 6d2ab8ef37..aeb4f204cd 100644 --- a/source3/winbindd/idmap_tdb.c +++ b/source3/winbindd/idmap_tdb.c @@ -8,17 +8,17 @@ Copyright (C) Jeremy Allison 2006 Copyright (C) Simo Sorce 2003-2006 Copyright (C) Michael Adam 2009-2010 - + 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 3 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, see <http://www.gnu.org/licenses/>. */ @@ -342,7 +342,7 @@ done: /********************************************************************** IDMAP ALLOC TDB BACKEND **********************************************************************/ - + /********************************** Allocate a new id. **********************************/ @@ -684,7 +684,7 @@ static NTSTATUS idmap_tdb_id_to_sid(struct idmap_domain *dom, struct id_map *map 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; @@ -713,7 +713,7 @@ static NTSTATUS idmap_tdb_id_to_sid(struct idmap_domain *dom, struct id_map *map ret = NT_STATUS_NONE_MAPPED; 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)); @@ -807,7 +807,7 @@ static NTSTATUS idmap_tdb_unixids_to_sids(struct idmap_domain *dom, struct id_ma for (i = 0; ids[i]; i++) { ids[i]->status = ID_UNKNOWN; } - + ctx = talloc_get_type(dom->private_data, struct idmap_tdb_context); for (i = 0; ids[i]; i++) { @@ -821,7 +821,7 @@ static NTSTATUS idmap_tdb_unixids_to_sids(struct idmap_domain *dom, struct id_ma ids[i]->status = ID_UNMAPPED; continue; } - + /* some fatal error occurred, return immediately */ goto done; } @@ -912,7 +912,7 @@ static NTSTATUS idmap_tdb_sids_to_unixids(struct idmap_domain *dom, struct id_ma for (i = 0; ids[i]; i++) { ids[i]->status = ID_UNKNOWN; } - + ctx = talloc_get_type(dom->private_data, struct idmap_tdb_context); state.dom = dom; diff --git a/source3/winbindd/nss_info_template.c b/source3/winbindd/nss_info_template.c index 0bc398e908..7eb7510dad 100644 --- a/source3/winbindd/nss_info_template.c +++ b/source3/winbindd/nss_info_template.c @@ -8,12 +8,12 @@ modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This library 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 Library General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -45,7 +45,7 @@ static NTSTATUS nss_template_get_info( struct nss_domain_entry *e, { if ( !homedir || !shell || !gecos ) return NT_STATUS_INVALID_PARAMETER; - + /* protect against home directories using whitespace in the username */ *homedir = talloc_strdup( ctx, lp_template_homedir() ); @@ -55,7 +55,7 @@ static NTSTATUS nss_template_get_info( struct nss_domain_entry *e, if ( !*homedir || !*shell ) { return NT_STATUS_NO_MEMORY; } - + return NT_STATUS_OK; } @@ -100,7 +100,7 @@ static struct nss_info_methods nss_template_methods = { .map_from_alias = nss_template_map_from_alias, .close_fn = nss_template_close }; - + NTSTATUS nss_info_template_init( void ) { return smb_register_idmap_nss(SMB_NSS_INFO_INTERFACE_VERSION, |