The Samba-Bugzilla – Attachment 14439 Details for
Bug 13490
testparm should check for invalid vfs objects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
testparm issues warning on wrong vfs object names
testparm-vfs-object-check.patch (text/plain), 1.65 KB, created by
Amit Kumar
on 2018-08-20 09:53:59 UTC
(
hide
)
Description:
testparm issues warning on wrong vfs object names
Filename:
MIME Type:
Creator:
Amit Kumar
Created:
2018-08-20 09:53:59 UTC
Size:
1.65 KB
patch
obsolete
>diff -up source3/utils/testparm.c.Orig source3/utils/testparm.c >--- source3/utils/testparm.c.Orig 2018-08-20 15:12:10.425548000 +0530 >+++ source3/utils/testparm.c 2018-08-20 15:16:25.482548000 +0530 >@@ -633,6 +633,39 @@ static void do_per_share_checks(int s) > "in conjunction on OS X clients results in undefined behaviour.\n\n"); > } > >+ /*Check for wrong VFS Object Name >+ * vfs_object_names are arranged in Alphabetical Order. >+ * Logic: For each vfs object in smb.conf >+ * 1. Donot traverse vfs object array if >+ * ASCII of vfs object in list > ASCII of vfs object in smb.conf >+ * 2. Search vfs object name in provided array >+ */ >+ char *vfs_object_names[] = {"acl_tdb","acl_xattr","aio_fork","aio_linux", >+ "aio_pthread","audit","btrfs","cacheprime","cap","catia","ceph", >+ "commit","crossrename","default_quota","dissort","extd_audit", >+ "fake_perms","fileid","fruit","full_audit","glusterfs","gpfs", >+ "linux_xfs_sgid","media_harmony","netatalk","offline","prealloc", >+ "preopen","readahead","readonly","recycle","shadow_copy2","shadow_copy", >+ "shell_snap","snapper","streams_depot","streams_xattr","syncops","test", >+ "time_audit","tsmsm","unityed_media","worm","xattr_tdb","zfsacl"}; >+ >+ strings_num = sizeof(vfs_object_names)/sizeof(char *); >+ while(vfs_objects[k]!=NULL){ >+ found = 0; >+ for (i = 0; i < strings_num; i++) { >+ if(vfs_object_names[i][0] > vfs_objects[k][0]) break; >+ if (!strcmp(vfs_objects[k], vfs_object_names[i])) { >+ found = 1; >+ break; >+ } >+ } >+ if(!found){ >+ break; >+ } >+ k++; >+ } >+ if (vfs_objects && found == 0) >+ fprintf(stderr,"WARNING: Wrong vfs Object name \n\n"); > } > > int main(int argc, const char *argv[])
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 13490
: 14439