From: Steve Dickson <SteveD@redhat.com>
To: Simo Sorce <simo@redhat.com>, jlayton@redhat.com
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] Remove unused arguments
Date: Mon, 20 Jan 2014 17:03:38 -0500 [thread overview]
Message-ID: <52DD9D3A.70300@RedHat.com> (raw)
In-Reply-To: <1389977800-10922-3-git-send-email-simo@redhat.com>
On 17/01/14 11:56, Simo Sorce wrote:
> The name variable is always set to NULL now in all callers, so just
> sto passing it around needlessly.
> The uid_t variable is not used at all, so chuck it out too.
>
> Signed-off-by: Simo Sorce <simo@redhat.com>
Committed...
steved.
> ---
> utils/gssd/gssd_proc.c | 2 +-
> utils/gssd/krb5_util.c | 10 +++++-----
> utils/gssd/krb5_util.h | 2 +-
> 3 files changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/utils/gssd/gssd_proc.c b/utils/gssd/gssd_proc.c
> index 2a6ea97135848eaf601bbed17e5b62cb77bd66b9..33cfeb2afd2ed6c6810dc39548b1a9da8daa8c37 100644
> --- a/utils/gssd/gssd_proc.c
> +++ b/utils/gssd/gssd_proc.c
> @@ -1095,7 +1095,7 @@ process_krb5_upcall(struct clnt_info *clp, uid_t uid, int fd, char *tgtname,
>
> /* Tell krb5 gss which credentials cache to use */
> /* Try first to acquire credentials directly via GSSAPI */
> - err = gssd_acquire_user_cred(uid, &gss_cred);
> + err = gssd_acquire_user_cred(&gss_cred);
> if (!err)
> create_resp = create_auth_rpc_client(clp, tgtname, &rpc_clnt, &auth, uid,
> AUTHTYPE_KRB5, gss_cred);
> diff --git a/utils/gssd/krb5_util.c b/utils/gssd/krb5_util.c
> index 230b909b14d244f832c0b5dd62e600cf8db4f80b..208c72bc072bceecc81f591887603e274dc35d9b 100644
> --- a/utils/gssd/krb5_util.c
> +++ b/utils/gssd/krb5_util.c
> @@ -1359,12 +1359,12 @@ gssd_k5_get_default_realm(char **def_realm)
> }
>
> static int
> -gssd_acquire_krb5_cred(gss_name_t name, gss_cred_id_t *gss_cred)
> +gssd_acquire_krb5_cred(gss_cred_id_t *gss_cred)
> {
> OM_uint32 maj_stat, min_stat;
> gss_OID_set_desc desired_mechs = { 1, &krb5oid };
>
> - maj_stat = gss_acquire_cred(&min_stat, name, GSS_C_INDEFINITE,
> + maj_stat = gss_acquire_cred(&min_stat, GSS_C_NO_NAME, GSS_C_INDEFINITE,
> &desired_mechs, GSS_C_INITIATE,
> gss_cred, NULL, NULL);
>
> @@ -1379,12 +1379,12 @@ gssd_acquire_krb5_cred(gss_name_t name, gss_cred_id_t *gss_cred)
> }
>
> int
> -gssd_acquire_user_cred(uid_t uid, gss_cred_id_t *gss_cred)
> +gssd_acquire_user_cred(gss_cred_id_t *gss_cred)
> {
> OM_uint32 min_stat;
> int ret;
>
> - ret = gssd_acquire_krb5_cred(GSS_C_NO_NAME, gss_cred);
> + ret = gssd_acquire_krb5_cred(gss_cred);
>
> /* force validation of cred to check for expiry */
> if (ret == 0) {
> @@ -1423,7 +1423,7 @@ limit_krb5_enctypes(struct rpc_gss_sec *sec)
> int err = -1;
>
> if (sec->cred == GSS_C_NO_CREDENTIAL) {
> - err = gssd_acquire_krb5_cred(GSS_C_NO_NAME, &sec->cred);
> + err = gssd_acquire_krb5_cred(&sec->cred);
> if (err)
> return -1;
> }
> diff --git a/utils/gssd/krb5_util.h b/utils/gssd/krb5_util.h
> index 3f0723e05cb3fd24b8063941e715010b21db0515..a319588a61253420da1ba7f62124df6b74795eea 100644
> --- a/utils/gssd/krb5_util.h
> +++ b/utils/gssd/krb5_util.h
> @@ -35,7 +35,7 @@ int gssd_refresh_krb5_machine_credential(char *hostname,
> char *gssd_k5_err_msg(krb5_context context, krb5_error_code code);
> void gssd_k5_get_default_realm(char **def_realm);
>
> -int gssd_acquire_user_cred(uid_t uid, gss_cred_id_t *gss_cred);
> +int gssd_acquire_user_cred(gss_cred_id_t *gss_cred);
>
> #ifdef HAVE_SET_ALLOWABLE_ENCTYPES
> extern int limit_to_legacy_enctypes;
>
next prev parent reply other threads:[~2014-01-20 22:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 21:41 [PATCH] Fix crdential sourcing with new setuid behavior in rpc.gssd Simo Sorce
2014-01-16 15:47 ` Jeff Layton
2014-01-17 1:28 ` Simo Sorce
2014-01-17 1:49 ` Jeff Layton
2014-01-17 4:11 ` [PATCH 0/2] Fix credential " Simo Sorce
2014-01-17 4:11 ` [PATCH 1/2] Improve first attempt at acquiring GSS credentials Simo Sorce
2014-01-17 4:11 ` [PATCH 2/2] Remove unused parameter Simo Sorce
2014-01-17 11:54 ` [PATCH 0/2] Fix credential sourcing with new setuid behavior in rpc.gssd Jeff Layton
2014-01-17 16:56 ` Simo Sorce
2014-01-17 16:56 ` [PATCH 1/2] Improve first attempt at acquiring GSS credentials Simo Sorce
2014-01-17 16:56 ` [PATCH 2/2] Remove unused arguments Simo Sorce
2014-01-20 22:03 ` Steve Dickson [this message]
2014-01-20 22:03 ` [PATCH 1/2] Improve first attempt at acquiring GSS credentials Steve Dickson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52DD9D3A.70300@RedHat.com \
--to=steved@redhat.com \
--cc=jlayton@redhat.com \
--cc=linux-nfs@vger.kernel.org \
--cc=simo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox