Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
To: Nalin Dahyabhai <nalin-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] also consider DIR:-type ccaches
Date: Fri, 24 Aug 2012 06:21:33 -0400	[thread overview]
Message-ID: <20120824062133.58e9d0ff@corrin.poochiereds.net> (raw)
In-Reply-To: <20120821225624.GH9511-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Tue, 21 Aug 2012 18:56:24 -0400
Nalin Dahyabhai <nalin-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:

> If we encounter a subdirectory while scanning a directory for a user's
> ccache, check if it's a "DIR" ccache.  Otherwise, continue as before,
> checking if it's a "FILE" ccache if it looks like a regular file.
> ---
>  cifs.upcall.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/cifs.upcall.c b/cifs.upcall.c
> index eef461d..6f95c1c 100644
> --- a/cifs.upcall.c
> +++ b/cifs.upcall.c
> @@ -292,6 +292,11 @@ static char *find_krb5_cc(const char *dirname, uid_t uid)
>  			free(namelist[i]);
>  			continue;
>  		}
> +		if (S_ISDIR(sbuf.st_mode)) {
> +			snprintf(ccname, sizeof(ccname), "DIR:%s/%s", dirname,
> +				 namelist[i]->d_name);
> +			credpath = ccname + 4;
> +		} else
>  		if (!S_ISREG(sbuf.st_mode)) {
>  			syslog(LOG_DEBUG, "%s: %s is not a regular file",
>  			       __func__, credpath);

Committed...
-- 
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

  parent reply	other threads:[~2012-08-24 10:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21 22:54 Finding krb5 ccaches of new types in new locations Nalin Dahyabhai
     [not found] ` <20120821225443.GG9511-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-08-21 22:56   ` [PATCH 1/2] also consider DIR:-type ccaches Nalin Dahyabhai
     [not found]     ` <20120821225624.GH9511-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-08-24 10:21       ` Jeff Layton [this message]
2012-08-21 22:56   ` [PATCH 2/2] scan /run/user/${UID} for ccaches, too Nalin Dahyabhai
     [not found]     ` <20120821225648.GI9511-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-08-24 10:21       ` Jeff Layton
2012-08-22 17:00   ` Finding krb5 ccaches of new types in new locations Jeff Layton

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=20120824062133.58e9d0ff@corrin.poochiereds.net \
    --to=jlayton-eunubhrolfbytjvyw6ydsg@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nalin-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    /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