Vishwajeet, > Real UID = 100 > Effective UID = 0 > Real GID = 1 > Effective GID = 0 > calling issetugid() > issetugid returning = 1 > > This shows that my euid (Effective Used Id) and ruid(Real Used Id) are > different. > issetugid returns 1(true). > This also shows that the process is secure.
No, it shows that the process is started as a set-uid or set-gid process. It says nothing about whether your process is secure or not. > Now I have two questions > Q-1 Whether this is a right way to make a secured process. It depends on what you want to make this process do. > Q-2 If my executable has a dependency then it should load that dependency > only from /usr/lib/secure or /lib/secure. In my another program it is not > taking from /usr/lib/secure rather it is taking from /usr/lib/ or > /lib as default path for looking a shared object. See the SECURITY section of the ld.so.1 manpage for rules regarding dependency resolving for secure processes. Regards, Joep