[PATCH] Makefile: use fileno macro work around on AIX

2019-04-18 Thread CHIGOT, CLEMENT
Declare FILENO_IS_A_MACRO on AIX On AIX, fileno(fp) is a macro and need to use the work around already made for BSD's. Signed-off-by: Clément Chigot --- config.mak.uname | 1 + 1 file changed, 1 insertion(+) diff --git a/config.mak.uname b/config.mak.uname index 41e85fab1c..86cbe47627 100644

[PATCH] git-compat-util: work around for access(X_OK) under root

2019-04-23 Thread CHIGOT, CLEMENT
On some OSes like AIX, access with X_OK is always true if launched under root. Add NEED_ACCESS_ROOT_HANDLER in order to use an access helper function. It checks with stat if any executable flags is set when the current user is root. Signed-off-by: Clément Chigot --- Makefile | 8 ++

Re: [PATCH] git-compat-util: work around for access(X_OK) under root

2019-04-23 Thread CHIGOT, CLEMENT
From: Junio C Hamano on behalf of Junio C Hamano > > On some OSes like AIX, access with X_OK is always true if launched under > > root. > > That may be the case, but you'd need to describe why it is a problem > here, before talking about the need for a "work around". > > For example, if a dire

Re: [PATCH] git-compat-util: work around for access(X_OK) under root

2019-04-24 Thread CHIGOT, CLEMENT
From: Junio C Hamano on behalf of Junio C Hamano > "CHIGOT, CLEMENT" writes: > > From: Junio C Hamano on behalf of Junio C Hamano > > > >> > On some OSes like AIX, access with X_OK is always true if launched under > >> > root. > >>

[PATCH v2] git-compat-util: work around for access(X_OK) under root

2019-04-24 Thread CHIGOT, CLEMENT
On AIX, access(X_OK) may success when run under root even if the execution isn't possible. This comes from the POSIX specifications which say: "... for a process with appropriate privileges, an implementation may indicate success for X_OK even if execute permission is not granted to any user." T

Re: [PATCH v2] git-compat-util: work around for access(X_OK) under root

2019-04-24 Thread CHIGOT, CLEMENT
> From: Junio C Hamano > "CHIGOT, CLEMENT" writes: > > > On AIX, access(X_OK) may success when run under root even if the > > s/success/succeed/; > > Also perhaps s/under/as/. > > > execution isn't possible. This comes from the POSIX speci

[PATCH v3] git-compat-util: work around for access(X_OK) under root

2019-04-25 Thread CHIGOT, CLEMENT
On AIX, access(X_OK) may succeed when run as root even if the execution isn't possible. This behavior is allowed by POSIX which says: ... for a process with appropriate privileges, an implementation may indicate success for X_OK even if execute permission is not granted to any user. It can

[PATCH] contrib/svn-fe: fix shebang for svnrdump_sim.py

2019-09-17 Thread CHIGOT, CLEMENT
The shebang for a python script should be "/usr/bin/env python" and not "/usr/bin/python". On some OSes like AIX, python default path is not under "/usr/bin" ("/opt/freeware/bin" for AIX). Note the main reason behind this change is that AIX rpm will add a dependency on "/usr/bin/python" instead of