This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Shell scripts [was Re: Avoiding /etc/passwd and /etc/group scans]


On Tue, Oct 22, 2002 at 10:04:28PM -0400, Pierre A. Humblet wrote:
>>I'm willing to be swayed on this but, so far, it doesn't seem like anyone
>>is effectively communicating with anyone else here.  We need to get on
>>the same page wrt the problems and how we are going to solve them.
>
>That's a tough one. 
>
>I see 3 possible ways:
>1) Your current way. Magic => executable. 
>   Convenient but chmod is broken and big break with Unix.
>2) use another CYGWIN= variable, to make that feature optional.
>3) use nontsec if you are not willing to 'chmod a+x foo'
>
>I think I would vote for 3.

I guess I have to agree.  It's too ugly to live like this.  Unless there
are objections, the party line will be "either chmod your files or
revert to nontsec".

I'll put things back the way they were, more or less modulo some
formatting fixups.

>I would also distribute a script or a program to chmod all scripts
>in a tree. Under user control, not from setup. 
>
>Also, you have
>     buf->st_mode |= STD_XBITS; 
>so there will be x bits even when it isn't readable. 
>That can be improved easily, for 1 or 2 or the script.

I hadn't really changed anything from the prior implementation other
than to move the test for '#!' out of the get_file_attributes != 0
condition.  The file is certainly readable if you've just figured out
that it began with '#!' by reading the first two characters.

Thanks for helping to think this through.

I guess we're back to making some kind of change in setup.exe or
telling people exactly what they need to do to fix their system
in some kind of document or popup.  A post-install script could
easily popup a message if required.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]