Attached is the patch for lsattr and chattr implementation.

This is the modified and better version from the last one I sent.
It is having the both the mains (lsattr_main() and chattr_main() )
in single file.

Also removed the dependency of additional file in lib, as common code is in the
same .c file.
In function readfile(), the buffer buf is free'd when readall() fails.  This free can cause a crash, if the buffer passed by user of function is not malloc'ed one.

names_to_pid() is one usecase example here.