[OpenAFS] weird behaviour of pts source

Jason Edgecombe jason@rampaginggeek.com
Sat, 11 Aug 2007 09:16:08 -0400


Marcus Watts wrote:
> Jason Edgecombe <jason@rampaginggeek.com> had posted:
>   
>> Christopher D. Clausen wrote:
>>     
>>> Jason Edgecombe <jason@rampaginggeek.com> wrote:
>>>   
>>>       
>>>> Hi,
>>>>
>>>> I compiled 1.4.4 on Mac OS X ppc Tiger with the supergroups option. I
>>>> seem to be getting weird behaviour from pts source. It seems to be
>>>> acting just like pts interactive. Am I doing something wrong?
>>>>
>>>> Here is a log:
>>>> ### I logged into afs as a regular user.
>>>> %cat /tmp/commands.txt
>>>> examine admin
>>>> quit
>>>> %./pts source -file /tmp/commands.txt
>>>> pts> quit
>>>> %./pts in < /tmp/commands.txt
>>>> Name: admin, id: 1, owner: system:administrators, creator: anonymous,
>>>>  membership: 2, flags: S----, group quota: 20.
>>>> %
>>>>
>>>> Can someone shed some light on this? Does my ptserver have to be
>>>> compiled with supergroups in order for pts source to work? I stumbled
>>>> over this while trying out the command so that I could write the man
>>>> page for it.
>>>>         
>
> "pts in < command-file" is supposed to work just as in your
> example.
>
> "pts source -file /tmp/commands.txt" is broken.  source is intended
> to be a way to pull in files to supplment an interactive front-end, so
> is supposed to be used something like this:
> 	lancashire$ echo 'examine admin' > /tmp/commands.txt
> 	lancashire$ pts in
> 	pts> source /tmp/commands.txt
> 	Name: admin, id: 2, owner: system:administrators, creator: bhoward,
> 	  membership: 21, flags: SOM--, group quota: unlimited.
> 	pts> quit
> 	lancashire$ 
>
> Using "pts source" ought to work.  I'm pretty sure I have a fixed
> version somewhere, which I'll try to locate this weekend.
>
>   
ok, your example works for me as well. I'm glad to know that it wasn't 
just me. Andrew Deason filed bug #67547 and I hope that's fixed in the 
next version.
>>>>     
>>>>         
>>> I can confirm this behavior on 1.4.2 and 1.4.4 on i386_linux26.  My 
>>> ptservers have supergroups enabled.
>>>
>>> The command doesn't seem to exist in the Windows pts binaries.
>>>       
>
> Windws is built from some of the same source, but as best I can
> determine, doesn't have real configuration support for options such
> as "supergroups".
>
>   
>>> <<CDC 
>>>
>>>   
>>>       
>> On a similar note, does pts interactive, sleep, quit and source need to 
>> be in a supergroups ifdef?
>>
>>
>> I'm looking in src/ptserver/pts.c
>>
>> #if defined(SUPERGROUPS)
>>
>>     ts = cmd_CreateSyntax("interactive", Interactive, 0,
>>                           "enter interactive mode");
>>     add_std_args(ts);
>>     cmd_CreateAlias(ts, "in");
>>
>>
>>
>> interactive modes seems useful even without supergroups, what gives?
>>     
>
> It's ifdef'd SUPERGROUPS for mainly historical reasons.  It shouldn't
> be ifdef'd at all.
>   

Are there any objections to enabling pts interactive, sleep, quit, and 
source for all compiles, not just supergroups?

Sincerely,
Jason