]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Simplify check_cmd_access() function
authorDavid Sommerseth <davids@redhat.com>
Wed, 2 May 2012 17:54:12 +0000 (19:54 +0200)
committerDavid Sommerseth <davids@redhat.com>
Thu, 3 May 2012 07:14:03 +0000 (09:14 +0200)
commit0576a9f2f8c8a7cf2d50579e6762df6c86b388c5
tree4c4b90f2fc897c6b37df92fc4b19eb14e7db9dd2
parenta0e8911bf3ce72178e72784f744556bef20727b3
Simplify check_cmd_access() function

To avoid confusion between check_file_access() and check_cmd_access() in
the future, remove unneeded arguments from check_cmd_access()

As a command will always be a file, it should always check for CHKACC_FILE
and nothing else.  And as the commands always will need X_OK, check only
for that.

One change from earlier behaviour is that R_OK is not checked for.  The
reason is that only scripts require R_OK to work.  However, a system might
be installed with binaries with only X_OK set.  If a script is missing
R_OK, then the execution will fail due to lacking permissions.

Signed-off-by: David Sommerseth <davids@redhat.com>
Acked-by: Alon Bar-Lev <alon.barlev@gmail.com>
Message-Id: 1335981252-7390-1-git-send-email-davids@redhat.com
URL: http://article.gmane.org/gmane.network.openvpn.devel/6391
src/openvpn/options.c