[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macr
From: |
Aharon Robbins |
Subject: |
Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro |
Date: |
Thu, 17 Apr 2014 17:18:00 +0300 |
User-agent: |
Heirloom mailx 12.5 6/20/10 |
> >> Ensuring that gawk never receives a filename beginning with "/inet/"
> >> (including indirectly in shell scripts) is impractical on a system with
> >> an existing /inet.
>
> > Currently, io.c:inetfile() tests only whether the prefix is
> > "/inet/" or "/inet4/" or "/inet6/" to decide whether it's a special
> > socket file. Should we do more parsing in that function and treat
> > files as regular unless they match the full specification? While there
> > still could be problems, it seems fairly unlikely that a regular
> > filename would collide with the full socket syntax.
>
> The collision with just "/inet" is so unlikely that any system where it
> occurs can be viewed as a statistical anomaly and the culprit invited to
> a) rename the directory, b) disable the feature entirely or c) modify
> gawk (and any scripts using the feature) to use a different pathname.
>
> > The only downside I see is that if somebody enters a socket-style name
> > incorrectly, it might be treated as a regular file instead of giving
> > an error such as "special file name `%s' is incomplete".
>
> I favour leaving the feature as-is -- it's been available for a while
> so there are probably production scripts relying on it working (and
> failing) exactly as it does now.
Dave,
I think I agree with Andy. Improving the check to look for
/inet{,4,6}/{tcp,udp}/whatever
would probably handle the case of a real /inet directory and should
not complicate the code overly much. I think this would let you
have your cake and eat it too, no?
Andy - do you have the cycles to prepare a patch?
Thanks,
Arnold
- [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Dave Sines, 2014/04/14
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Eli Zaretskii, 2014/04/14
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Dave Sines, 2014/04/15
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Andrew J. Schorr, 2014/04/15
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Dave Sines, 2014/04/15
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro,
Aharon Robbins <=
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Andrew J. Schorr, 2014/04/17
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Aharon Robbins, 2014/04/17
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Andrew J. Schorr, 2014/04/17
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Aharon Robbins, 2014/04/18
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Andrew J. Schorr, 2014/04/18
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Aharon Robbins, 2014/04/20
- Re: [bug-gawk] [PATCH] gawk 4.1.1 replace "/inet" with preprocessor macro, Andrew J. Schorr, 2014/04/20