From: <no...@so...> - 2000-11-20 18:15:51
|
Bug #119254, was updated on 2000-Oct-25 22:04 Here is a current snapshot of the bug. Project: Tcl Category: File System Status: Open Resolution: None Bug Group: 8.4a1 Priority: 5 Summary: [file executable file_name] always returns 1 when working fr Details: OriginalBugID: 5859 Bug Version: 8.4a1 SubmitDate: '2000-06-08' LastModified: '2000-07-25' Severity: MED Status: Assigned Submitter: techsupp ChangedBy: ericm OS: Solaris OSVersion: SPARC Solaris 2.6 FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Askar Rahimberdiev ReproducibleScript: When working from root account, [file executable file_name] command always returns 1 disregarding actual file permissions (for any existing file). However, subsequent exec command will fail if file has no execute permission. DesiredBehavior: Check file permissions using stat() (not access()) system call. Verified on Linux and Solaris. - eric -- 07/25/2000 ericm Follow-Ups: Date: 2000-Nov-15 06:41 By: dkf Comment: Why is Solaris claiming that files are executable (via access()) when working as root? Isn't this a Solaris (or filesystem) bug? Mind you, a file can be unexecutable (due to a bad Magic Number) even if it has the appropriate execute bits set in its file mode; [file execute] cannot ensure that an [exec] won't fail due to non-executability... ------------------------------------------------------- Date: 2000-Nov-20 10:15 By: hobbs Comment: This has nothing to do in particular with Solaris. This is a valid stupid feature according to the POSIX spec. From the spec: "Some historical implementations of access() do not check the file's access correctly when the real user ID of the process is the superuser. In particular, they indicate that the file may be executed without regard to whether the file is executable. The standards allow this behavior." Thus, we shouldn't rely on access() for executability when the user is root. ------------------------------------------------------- For detailed info, follow this link: http://sourceforge.net/bugs/?func=detailbug&bug_id=119254&group_id=10894 |