Re: Can a driver give root privileges to a process?

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

 



"Dhiman, Gaurav" wrote:
> 
> I hope, if you change the "uid" or "euid" (not sure which one) in
> "task_struct" of current process to the uid of root, you process will
> have root privileges. This is what "login" user program do, using set
> _uid systemcall.
> 
> There are specific significance of uid, euid, suid fields in
> task_struct, before modifying them, do check there significance.
> 
> I might be wrong, not sure about it, if I am wrong, please correct me.
> 
> Regards,
> Gaurav
> 

first do a get_current and then in the task_struct returned by get_current set the following to 0.
i think you should also set fsuid and gid,egid,sgid,fsgid in addititon to the members mentioned above
to give root priveleges and also for the process to read and write files readable/write'able by root.

hope iam right :-) .

cheers,
Amith

--
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