I want to add validation to to nfs operations. E.g. if I try to create a filename thats too long over nfs via nfs ganesha, I want nfs to fail. I can add this logic to https://github.com/phdeniel/nfs-ganesha/blob/master/src/FSAL/FSAL_CEPH/handl... and compile ganesha myself, but is there a better way to do it?
I don't quite understand what you are wanting to do. Ganesha will reject filenames that are too long in CREATE, RENAME, LOOKUP, OPEN, etc. Also, you will want to use the next branch or one of the stable branches from the project repo: https://github.com/nfs-ganesha/nfs-ganesha The phdeniel repo is very out of date. Frank
-----Original Message----- From: ethan.deson@oracle.com [mailto:ethan.deson@oracle.com] Sent: Wednesday, August 25, 2021 11:49 AM To: devel@lists.nfs-ganesha.org Subject: [NFS-Ganesha-Devel] Adding validation to NFS operations
I want to add validation to to nfs operations. E.g. if I try to create a filename thats too long over nfs via nfs ganesha, I want nfs to fail. I can add this logic to https://github.com/phdeniel/nfs- ganesha/blob/master/src/FSAL/FSAL_CEPH/handle.c and compile ganesha myself, but is there a better way to do it? _______________________________________________ Devel mailing list -- devel@lists.nfs-ganesha.org To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org
Appreciate it, will use most recent repo. I want to add validation where my definition of "too long" is custom. Or I might want to reject certain files with certain extensions. Basically, what is the entry point for adding custom logic to nfs ganesha? Is there anything besides modifying the source FSAL?
maxnamelen and maxpathlen are part of fsal_staticfsinfo_t. FSAL_CEPH currently sets it to NAME_MAX, which is defined in limits.h as 255. If you need a programatic way of determining it, you can use fs_maxnamelen() in the export_ops. Some FSALs define that as well. Daniel On 8/25/21 10:00 PM, ethan.deson@oracle.com wrote:
Appreciate it, will use most recent repo.
I want to add validation where my definition of "too long" is custom. Or I might want to reject certain files with certain extensions. Basically, what is the entry point for adding custom logic to nfs ganesha? Is there anything besides modifying the source FSAL? _______________________________________________ Devel mailing list -- devel@lists.nfs-ganesha.org To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org
participants (3)
-
Daniel Gryniewicz -
ethan.deson@oracle.com -
Frank Filz