Adds constants DEF_MODE_FILE and DEF_MODE_DIR
This commit is contained in:
@@ -40,6 +40,8 @@ section .rodata
|
|||||||
S_ISVTX equ 0001000q ;sticky bit
|
S_ISVTX equ 0001000q ;sticky bit
|
||||||
S_ISGID equ 0002000q ;set-group-ID bit
|
S_ISGID equ 0002000q ;set-group-ID bit
|
||||||
S_ISUID equ 0004000q ;set-user-ID bit
|
S_ISUID equ 0004000q ;set-user-ID bit
|
||||||
|
DEF_MODE_FILE equ S_IWOTH | S_IROTH | S_IWGRP | S_IRGRP | S_IWUSR | S_IRUSR
|
||||||
|
DEF_MODE_DIR equ S_IRWXO | S_IRWXG | S_IRWXU
|
||||||
; Stat buffer fields
|
; Stat buffer fields
|
||||||
ST_DEV equ 0 ; Device unsigned
|
ST_DEV equ 0 ; Device unsigned
|
||||||
ST_INO equ 8 ; File serial number unsigned
|
ST_INO equ 8 ; File serial number unsigned
|
||||||
|
@@ -113,7 +113,7 @@ fopen:
|
|||||||
pop rdi
|
pop rdi
|
||||||
push rdi
|
push rdi
|
||||||
not rax
|
not rax
|
||||||
mov rsi, 0666q
|
mov rsi, DEF_MODE_FILE
|
||||||
and rsi, rax
|
and rsi, rax
|
||||||
mov rax, NR_creat
|
mov rax, NR_creat
|
||||||
syscall
|
syscall
|
||||||
|
Reference in New Issue
Block a user