[OpenAFS] openafs pioctl issue on windows

David Bear David.Bear@asu.edu
Thu, 23 Oct 2008 15:56:07 -0700


------=_Part_59797_23797965.1224802567144
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Comments inline below..

On Wed, Oct 22, 2008 at 2:28 PM, Jeffrey Altman <
jaltman@secure-endpoints.com> wrote:

> If NIM is getting and listing tokens, then KFW is working just fine.
>
> pioctl error 0x66543218 means "End of List"
>
Okay, I generated garbage for you. Sorry. I thought I could produce this
remotely, so I did a psexec shell and captured this info. Clearly, I would
be been using a different smb session than the primary user.


> The tokens command does not use KFW.  It speaks to the AFS cache manager
> via the pioctl interface which is implemented as a file
> open/write/read/close sequence on a file called _._AFS_IOCTL_._ in the
> AFS name space.  The file open is performed in the context of a
> particular SMB session.  Each session has an authenticated identity.
> The tokens are stored in the AFS cache manager bound to the SMB
> authentication identity.
>
> I have been back to the system, logged in with the users credentials
instead of my own and generated the afsd_alloc.log. It is on /afs/
asu.edu/pp/oss/afsDumps along with the output of klist, a screen shot of NIM
and the configuration files I use with I install KfW.


>
> With oafw 1.5.54 if you use "fs memdump" it will output the list of
> tokens that are known as part of the output to
> %windir%\temp\afsd_alloc.log.  However, it won't tell you what smb
> authentication session a command is executed under.
>
KFW is version 3.2.2 -- resintalled today.
Windows is XP Pro with SP2
credential cache is API: -- we do make use of windows logon credentials.
I've stopped using kinit and only use NIM to get and destroy tickets. I do
succesfully get tickets in asu.edu,  as the output of klist shows:
Ticket cache: API:bvossoug@ASU.EDU <API%3Abvossoug@ASU.EDU>
Default principal: bvossoug@ASU.EDU

Valid starting Expires Service principal
10/23/08 15:34:38 10/24/08 01:34:39 krbtgt/ASU.EDU@ASU.EDU
 renew until 10/30/08 15:30:56

but I'm not getting the afs@asu.edu credential.. ?? why?
So, does this indicate the problem is with KfW instead of openafs?
>
>

> > On Wed, Oct 22, 2008 at 12:18 PM, Jeffrey Altman
> > <jaltman@secure-endpoints.com <mailto:jaltman@secure-endpoints.com>>
> wrote:
> >
> >     NIM uses the same pioctl call as tokens.exe to obtain the tokens
> list.
> >
> >     As long as they are being executed from within the same logon session
> >     they will display the same results.
> >
> >     Hint: "Run as ..." or "Run as administrator" produces a new logon
> >     session.
> >
> > Okay -- I tried this from cmd, in a new session.
> > This failes.
> > C:\WINDOWS\system32>tokens
> >
> > Tokens held by the Cache Manager:
> >
> >   --End of list --
> > pioctl temp != 0: 0x66543218
> > Then
> > C:\WINDOWS\system32>kinit iddwb
> > kinit(v5): Inappropriate I/O control operation while getting initial
> > credentials
> >
> > So, I guess kfw is not working properly here. Any pointers on what could
> > be wrong with KFW?
> >
> >
> >     Jeffrey Altman
> >
> >     David Bear wrote:
> >     > I am using
> >     >
> >     > /usr/sbin/rxdebug -server pp-bvossoughi.dhcp.asu.edu
> >     <http://pp-bvossoughi.dhcp.asu.edu>
> >     > <http://pp-bvossoughi.dhcp.asu.edu> -port 7001 -vers
> >     >
> >     > Trying 10.218.16.141 (port 7001):
> >     > AFS version: OpenAFS_1.5.5400
> >     >
> >     > This system has had intermittent erros with accessing openafs. The
> >     issue
> >     > seems to be always an access/token issue.
> >     >
> >     > KFW 3.2.2 is install and the user is able to get tokens in the
> >     asu.edu <http://asu.edu>
> >     > <http://asu.edu> realm. NIM show the TGT's.
> >     >
> >     > However, any attempt to use 'tokens' to display the afs tokens
> >     causes this:
> >     >
> >     > C:\Documents and Settings\bvossoug>tokens
> >     > Tokens held by the Cache Manager:
> >     >
> >     > pioctl temp != 0: 0x66543218
> >     >   --End of list --
> >     >
> >     > I googled and found someone with a similar error here:
> >     >
> >
> http://www.openafs.org/pipermail/openafs-info/2006-December/024568.html
> >     >
> >     > But I don't know if it could be related since there was no
> >     resolution on
> >     > the thread and it is so old.
> >     >
> >     > I created an fs minidump and copied that ad the afsd_init.log to
> >     an afs
> >     > location that should be world readable at
> >     >
> >     > /afs/asu.edu/pp/oss/afsDumps <http://asu.edu/pp/oss/afsDumps>
> >     <http://asu.edu/pp/oss/afsDumps>
> >     >
> >     > ( the acl is set as system:anyuser so I hope the world can read
> this
> >     > location )
> >     >
> >     > Any pointers on where to go next? (BTW, the issue seems to be tied
> >     to a
> >     > specific user logon. I was able to log on to windows as myself, get
> >     > tokens, and use afs)
> >     >
> >     > --
> >     >
> >     > David Bear
> >     > College of Public Programs at ASU
> >     > 602-464-0424
> >
> >
> >
> >
> > --
> > David Bear
> > College of Public Programs at ASU
> > 602-464-0424
>
>
>


-- 
David Bear
College of Public Programs at ASU
602-464-0424

------=_Part_59797_23797965.1224802567144
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Comments inline below..<br><br><div class="gmail_quote">On Wed, Oct 22, 2008 at 2:28 PM, Jeffrey Altman <span dir="ltr">&lt;<a href="mailto:jaltman@secure-endpoints.com">jaltman@secure-endpoints.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">If NIM is getting and listing tokens, then KFW is working just fine.<br>
<br>
pioctl error 0x66543218 means &quot;End of List&quot;<br>
</blockquote><div></div><div>Okay, I generated garbage for you. Sorry. I thought I could produce this remotely, so I did a psexec shell and captured this info. Clearly, I would be been using a different smb session than the primary user.</div>
<div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">The tokens command does not use KFW. &nbsp;It speaks to the AFS cache manager<br>
via the pioctl interface which is implemented as a file<br>
open/write/read/close sequence on a file called _._AFS_IOCTL_._ in the<br>
AFS name space. &nbsp;The file open is performed in the context of a<br>
particular SMB session. &nbsp;Each session has an authenticated identity.<br>
The tokens are stored in the AFS cache manager bound to the SMB<br>
authentication identity.<br>
<br>
</blockquote><div></div><div>I have been back to the system, logged in with the users credentials instead of my own and generated the afsd_alloc.log. It is on /afs/<a href="http://asu.edu/pp/oss/afsDumps">asu.edu/pp/oss/afsDumps</a> along with the output of klist, a screen shot of NIM and the configuration files I use with I install KfW.</div>
<div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
With oafw 1.5.54 if you use &quot;fs memdump&quot; it will output the list of<br>
tokens that are known as part of the output to<br>
%windir%\temp\afsd_alloc.log. &nbsp;However, it won&#39;t tell you what smb<br>
authentication session a command is executed under.<br>
</blockquote><div></div><div>KFW is version 3.2.2 -- resintalled today.</div><div>Windows is XP Pro with SP2</div><div>credential cache is API: -- we do make use of windows logon credentials.</div><div>I&#39;ve stopped using kinit and only use NIM to get and destroy tickets. I do succesfully get tickets in <a href="http://asu.edu">asu.edu</a>, &nbsp;as the output of klist shows:</div>
<div></div><div>Ticket cache: <a href="mailto:API%3Abvossoug@ASU.EDU">API:bvossoug@ASU.EDU</a><br>Default principal: <a href="mailto:bvossoug@ASU.EDU">bvossoug@ASU.EDU</a><br><br>Valid starting     Expires            Service principal<br>
10/23/08 15:34:38  10/24/08 01:34:39  krbtgt/<a href="http://ASU.EDU">ASU.EDU</a>@<a href="http://ASU.EDU">ASU.EDU</a><br>&nbsp;renew until 10/30/08 15:30:56<br><br></div><div>but I&#39;m not getting the <a href="mailto:afs@asu.edu">afs@asu.edu</a> credential.. ?? why?</div>
<div></div><div>So, does this indicate the problem is with KfW instead of openafs?&nbsp;</div><div>&gt;<br>
&gt;<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">&gt; On Wed, Oct 22, 2008 at 12:18 PM, Jeffrey Altman<br>
</div><div><div class="Wj3C7c">&gt; &lt;<a href="mailto:jaltman@secure-endpoints.com">jaltman@secure-endpoints.com</a> &lt;mailto:<a href="mailto:jaltman@secure-endpoints.com">jaltman@secure-endpoints.com</a>&gt;&gt; wrote:<br>

&gt;<br>
&gt; &nbsp; &nbsp; NIM uses the same pioctl call as tokens.exe to obtain the tokens list.<br>
&gt;<br>
&gt; &nbsp; &nbsp; As long as they are being executed from within the same logon session<br>
&gt; &nbsp; &nbsp; they will display the same results.<br>
&gt;<br>
&gt; &nbsp; &nbsp; Hint: &quot;Run as ...&quot; or &quot;Run as administrator&quot; produces a new logon<br>
&gt; &nbsp; &nbsp; session.<br>
&gt;<br>
&gt; Okay -- I tried this from cmd, in a new session.<br>
&gt; This failes.<br>
&gt; C:\WINDOWS\system32&gt;tokens<br>
&gt;<br>
&gt; Tokens held by the Cache Manager:<br>
&gt;<br>
&gt; &nbsp; --End of list --<br>
&gt; pioctl temp != 0: 0x66543218<br>
&gt; Then<br>
&gt; C:\WINDOWS\system32&gt;kinit iddwb<br>
&gt; kinit(v5): Inappropriate I/O control operation while getting initial<br>
&gt; credentials<br>
&gt;<br>
&gt; So, I guess kfw is not working properly here. Any pointers on what could<br>
&gt; be wrong with KFW?<br>
&gt;<br>
&gt;<br>
&gt; &nbsp; &nbsp; Jeffrey Altman<br>
&gt;<br>
&gt; &nbsp; &nbsp; David Bear wrote:<br>
&gt; &nbsp; &nbsp; &gt; I am using<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; /usr/sbin/rxdebug -server <a href="http://pp-bvossoughi.dhcp.asu.edu" target="_blank">pp-bvossoughi.dhcp.asu.edu</a><br>
&gt; &nbsp; &nbsp; &lt;<a href="http://pp-bvossoughi.dhcp.asu.edu" target="_blank">http://pp-bvossoughi.dhcp.asu.edu</a>&gt;<br>
&gt; &nbsp; &nbsp; &gt; &lt;<a href="http://pp-bvossoughi.dhcp.asu.edu" target="_blank">http://pp-bvossoughi.dhcp.asu.edu</a>&gt; -port 7001 -vers<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; Trying <a href="http://10.218.16.141" target="_blank">10.218.16.141</a> (port 7001):<br>
&gt; &nbsp; &nbsp; &gt; AFS version: OpenAFS_1.5.5400<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; This system has had intermittent erros with accessing openafs. The<br>
&gt; &nbsp; &nbsp; issue<br>
&gt; &nbsp; &nbsp; &gt; seems to be always an access/token issue.<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; KFW 3.2.2 is install and the user is able to get tokens in the<br>
&gt; &nbsp; &nbsp; <a href="http://asu.edu" target="_blank">asu.edu</a> &lt;<a href="http://asu.edu" target="_blank">http://asu.edu</a>&gt;<br>
&gt; &nbsp; &nbsp; &gt; &lt;<a href="http://asu.edu" target="_blank">http://asu.edu</a>&gt; realm. NIM show the TGT&#39;s.<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; However, any attempt to use &#39;tokens&#39; to display the afs tokens<br>
&gt; &nbsp; &nbsp; causes this:<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; C:\Documents and Settings\bvossoug&gt;tokens<br>
&gt; &nbsp; &nbsp; &gt; Tokens held by the Cache Manager:<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; pioctl temp != 0: 0x66543218<br>
&gt; &nbsp; &nbsp; &gt; &nbsp; --End of list --<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; I googled and found someone with a similar error here:<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; <a href="http://www.openafs.org/pipermail/openafs-info/2006-December/024568.html" target="_blank">http://www.openafs.org/pipermail/openafs-info/2006-December/024568.html</a><br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; But I don&#39;t know if it could be related since there was no<br>
&gt; &nbsp; &nbsp; resolution on<br>
&gt; &nbsp; &nbsp; &gt; the thread and it is so old.<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; I created an fs minidump and copied that ad the afsd_init.log to<br>
&gt; &nbsp; &nbsp; an afs<br>
&gt; &nbsp; &nbsp; &gt; location that should be world readable at<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; /afs/<a href="http://asu.edu/pp/oss/afsDumps" target="_blank">asu.edu/pp/oss/afsDumps</a> &lt;<a href="http://asu.edu/pp/oss/afsDumps" target="_blank">http://asu.edu/pp/oss/afsDumps</a>&gt;<br>
&gt; &nbsp; &nbsp; &lt;<a href="http://asu.edu/pp/oss/afsDumps" target="_blank">http://asu.edu/pp/oss/afsDumps</a>&gt;<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; ( the acl is set as system:anyuser so I hope the world can read this<br>
&gt; &nbsp; &nbsp; &gt; location )<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; Any pointers on where to go next? (BTW, the issue seems to be tied<br>
&gt; &nbsp; &nbsp; to a<br>
&gt; &nbsp; &nbsp; &gt; specific user logon. I was able to log on to windows as myself, get<br>
&gt; &nbsp; &nbsp; &gt; tokens, and use afs)<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; --<br>
&gt; &nbsp; &nbsp; &gt;<br>
&gt; &nbsp; &nbsp; &gt; David Bear<br>
&gt; &nbsp; &nbsp; &gt; College of Public Programs at ASU<br>
&gt; &nbsp; &nbsp; &gt; 602-464-0424<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; David Bear<br>
&gt; College of Public Programs at ASU<br>
&gt; 602-464-0424<br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>David Bear<br>College of Public Programs at ASU<br>602-464-0424<br>

------=_Part_59797_23797965.1224802567144--