]> gitweb.factorcode.org Git - factor.git/commitdiff
io.files.acls: Fix bitrot in acls and add a test to ensure it doesn't fail.
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 1 Apr 2021 02:48:41 +0000 (21:48 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 1 Apr 2021 03:19:15 +0000 (22:19 -0500)
extra/io/files/acls/macosx/ffi/ffi.factor
extra/io/files/acls/macosx/macosx-tests.factor [new file with mode: 0644]

index 38a2a003f6139175b2c57a94fb5f50bbef5a3b14..317ab4d08f5a88db62e7f598e95eaa522a4fad2b 100644 (file)
@@ -131,10 +131,10 @@ FUNCTION: acl_t acl_init ( int count )
 
 FUNCTION: acl_t acl_get_fd ( int fd )
 FUNCTION: acl_t acl_get_fd_np ( int fd, acl_type_t type )
-FUNCTION: acl_t acl_get_file ( char* path_p, acl_type_t type )
-FUNCTION: acl_t acl_get_link_np ( char* path_p, acl_type_t type )
+FUNCTION: acl_t acl_get_file ( c-string path_p, acl_type_t type )
+FUNCTION: acl_t acl_get_link_np ( c-string path_p, acl_type_t type )
 
-FUNCTION: int acl_set_file ( char* path_p, acl_type_t type, acl_t acl )
+FUNCTION: int acl_set_file ( c-string path_p, acl_type_t type, acl_t acl )
 
 FUNCTION: int acl_get_entry ( acl_t acl, int entry_id, acl_entry_t* entry_p )
 
@@ -145,9 +145,9 @@ FUNCTION: ssize_t acl_copy_ext ( void* buf_p, acl_t acl, ssize_t size )
 FUNCTION: ssize_t acl_copy_ext_native ( void* buf_p, acl_t acl, ssize_t size )
 FUNCTION: acl_t acl_copy_int ( void* buf_p )
 FUNCTION: acl_t acl_copy_int_native ( void* buf_p )
-FUNCTION: acl_t acl_from_text ( char* buf_p )
+FUNCTION: acl_t acl_from_text ( c-string buf_p )
 FUNCTION: ssize_t acl_size ( acl_t acl )
-FUNCTION: char* acl_to_text ( acl_t acl, ssize_t* len_p )
+FUNCTION: c-string acl_to_text ( acl_t acl, ssize_t* len_p )
 FUNCTION: int acl_valid ( acl_t acl )
 FUNCTION: int acl_add_perm ( acl_permset_t permset_d, acl_perm_t perm )
 FUNCTION: int acl_delete_perm ( acl_permset_t permset_d, acl_perm_t perm )
@@ -184,4 +184,4 @@ FUNCTION: int mbr_uuid_to_sid ( uuid_t uu, nt_sid_t *sid )
 
 TYPEDEF: char[37] uuid_string_t
 
-FUNCTION: int mbr_uuid_to_string (  uuid_t uu, char* string )
+FUNCTION: int mbr_uuid_to_string (  uuid_t uu, c-string string )
diff --git a/extra/io/files/acls/macosx/macosx-tests.factor b/extra/io/files/acls/macosx/macosx-tests.factor
new file mode 100644 (file)
index 0000000..e3942e2
--- /dev/null
@@ -0,0 +1,7 @@
+! Copyright (C) 2021 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
+USING: io.files.acls.macosx io.pathnames system tools.test ;
+IN: io.files.acls.macosx.tests
+
+{ } [ vm-path acls. ] unit-test
+{ } [ home "Pictures" append-path acls. ] unit-test