Need some info about setxattr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greetings,
I am trying to use the system call 'setxattr', the usage of the call shows the following int setxattr (const char *path, const char *name,
                       const void *value, size_t size, int flags); now if I try to set the extended attributes for the file /home/guest/Rajeev/data, then the path variable is /home/guest/Rajeev & the name variable will be "data". Correct me if I am wrong. The command 'getfacl' shows the regular permissions assigned to the file using the chmod command. Now I am trying to use the system call setxattr . Now my question is 
How to pass the value parameter (third argument ) in the system call. This value is a void pointer. Can the value be string, if yes in which format the value needs to be passed as. 
Can the value of the variable be 'long' as shown in the sources. If the value is a long variable then what are the values that can be passed to it.

Can you please help me by providing the example of the code which illustrates the usage of the "setxattr" call.  I have already installed all the RPM s needed for the extended attribute support. The config file for the currently running kernel contains the support for the acl.   
Any help in this regard will be great.
Thanks & Regards,
Subramanya swamy.R
 
 
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux