Page MenuHomeFreeBSD

Provide chmod to flua
ClosedPublic

Authored by 2333_outlook.jp on Mar 11 2020, 10:04 PM.
Tags
None
Referenced Files
F157258858: D24036.id69486.diff
Tue, May 19, 7:16 PM
Unknown Object (File)
Sun, May 17, 4:02 AM
Unknown Object (File)
Sun, May 17, 3:44 AM
Unknown Object (File)
Tue, May 5, 11:40 PM
Unknown Object (File)
Sat, May 2, 12:28 PM
Unknown Object (File)
Sun, Apr 26, 6:23 AM
Unknown Object (File)
Sat, Apr 25, 3:15 PM
Unknown Object (File)
Apr 18 2026, 9:59 AM
Subscribers

Details

Summary

Lua does not provide a native way to change the permission of a file. Adding this function will enable flua scripts to access and modify (by using a temp file with right permission, then overwritting) protected files.

usage: > require'posix.sys.stat'.chmod('hello.txt', 511)
0 -- example if success
nil No such file or directory 2 -- example if failure

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

2333_outlook.jp edited the summary of this revision. (Show Details)
2333_outlook.jp edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Mar 13 2020, 2:29 AM
This revision was automatically updated to reflect the committed changes.