Re: Printing environment variables for a process

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

 





On 1/29/08, Manish Katiyar <mkatiyar@xxxxxxxxx> wrote:
Hi,

Is it possible to print or access the environment variables of a
process from kernel module. I know it can be done from userspace, but
if there is a running process I don't know if there is any way to
access/print the environment of a process from userspace. So I thought
if it is possible to write a module which accepts a pid during load
and then prints its environment variables.

I tried looking at task_struct to see which member holds the
environment, but cudnt get much. Any help appreciated.

--
Thanks & Regards,

Hi Manish,

It is not possiable to access environment variable
of a process, even if the kernel is running in that
process context. getenv() and friends are userspace 
buddys only as you have already pointed out.

Thanks




[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