From patchwork Tue Jul 27 19:37:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 114606 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6RJb9YV011308 for ; Tue, 27 Jul 2010 19:37:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751759Ab0G0ThL (ORCPT ); Tue, 27 Jul 2010 15:37:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61496 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751794Ab0G0ThK (ORCPT ); Tue, 27 Jul 2010 15:37:10 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6RJb9pU001126 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 27 Jul 2010 15:37:10 -0400 Received: from tlielax.poochiereds.net (vpn-9-88.rdu.redhat.com [10.11.9.88]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6RJb7wF024873 for ; Tue, 27 Jul 2010 15:37:09 -0400 From: Jeff Layton To: linux-cifs@vger.kernel.org Subject: [PATCH 3/4] cifs.upcall: swap c99 initializers for memset calls Date: Tue, 27 Jul 2010 15:37:06 -0400 Message-Id: <1280259427-14617-4-git-send-email-jlayton@samba.org> In-Reply-To: <1280259427-14617-1-git-send-email-jlayton@samba.org> References: <1280259427-14617-1-git-send-email-jlayton@samba.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 27 Jul 2010 19:37:12 +0000 (UTC) diff --git a/cifs.upcall.c b/cifs.upcall.c index 8f7850a..9b1436e 100644 --- a/cifs.upcall.c +++ b/cifs.upcall.c @@ -258,7 +258,7 @@ cifs_krb5_get_req(const char *principal, const char *ccname, krb5_keyblock *tokb; krb5_context context; krb5_ccache ccache; - krb5_creds in_creds = { }, *out_creds; + krb5_creds in_creds, *out_creds; krb5_data apreq_pkt, in_data; krb5_auth_context auth_context = NULL; @@ -275,6 +275,8 @@ cifs_krb5_get_req(const char *principal, const char *ccname, goto out_free_context; } + memset(&in_creds, 0, sizeof(in_creds)); + ret = krb5_cc_get_principal(context, ccache, &in_creds.client); if (ret) { syslog(LOG_DEBUG, "%s: unable to get client principal name", @@ -619,7 +621,7 @@ int main(const int argc, char *const argv[]) int c, try_dns = 0, legacy_uid = 0; char *buf, *princ = NULL, *ccname = NULL; char hostbuf[NI_MAXHOST], *host; - struct decoded_args arg = { }; + struct decoded_args arg; const char *oid; hostbuf[0] = '\0'; @@ -677,6 +679,8 @@ int main(const int argc, char *const argv[]) goto out; } + memset(&arg, 0, sizeof(arg)); + have = decode_key_description(buf, &arg); SAFE_FREE(buf); if ((have & DKD_MUSTHAVE_SET) != DKD_MUSTHAVE_SET) {