开发者

Unknown open() flag passed by execve()

开发者 https://www.devze.com 2023-01-15 16:22 出处:网络
When executing a bash script located on my FUSE filesystem, an open() call is made with these flags: debug,cpfsfuse.c(62),cpfs_fuse_open: path \"/make.sh\", flags 0100040

When executing a bash script located on my FUSE filesystem, an open() call is made with these flags:

debug,cpfsfuse.c(62),cpfs_fuse_open: path "/make.sh", flags 0100040

The flags (0100040) should correspond to those passed in parameter 2 of open(). The unknown flag originates from an execve() call:

matt@stanley:~/cpfs/dir$ strace -f ./make.sh 
execve("./make.sh", ["./make.sh"], [/* 37 vars */]

My code recognises #define O_LARGEFILE 00100000, but the other flag appears to arise only when execve() is called.

Grepping for the flag does not find it:

matt@stanley:~/cpfs$ grep -RP '\b00*40\b' /usr/inc开发者_StackOverflow中文版lude/ | less

Mostly terminal flags are found. Can anyone shed some light on either how to track down the origin and meaning of this flag, or where to find its definition?


/usr/include/linux/fs.h:

/* File is opened for execution with sys_execve / sys_uselib */
#define FMODE_EXEC              ((fmode_t)32)


This might be a combination of flags. (ORed).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号