bugSystem V style init programs - Bugs: bug #35855, init duplicates some environment...

 
 

bug #35855: init duplicates some environment variables when executing programs

Submitted by:  None
Submitted on:  Thu 15 Mar 2012 09:09:45 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Dr. Werner Fink <wfink>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 16 Mar 2012 04:47:20 PM UTC, comment #2:

Also fixed in current svn head

Dr. Werner Fink <wfink>
Project AdministratorIn charge of this item.
Fri 16 Mar 2012 11:26:32 AM UTC, comment #1:

Guess: you're using also initrd, then check if the environment
is modified in the initrd before /sbin/init is started the
linuxrc script. You may also check the enviorment of init
its self (e.g. by `ps e 1 | less')

Beside this: do have a name other than Anonymous?

Dr. Werner Fink <wfink>
Project AdministratorIn charge of this item.
Thu 15 Mar 2012 09:09:45 PM UTC, original submission:

1. If I specify "CONSOLE=..." variable in the kernel line, I'll get two
"CONSOLE=..." variables in the environment when init spawns a process.

2. If I specify "INIT_VERSION=111" variable in the kernel line and execute
command line "init -e INIT_VERSION=222", I'll get three different
"INIT_VERSION=..." environment variables when init spawns a process.

init_buildenv function at init.c doesn't compare variables' names.

Example:

----- /etc/inittab -----
...
myid:a:once:env
----------

kernel line:
"kernel /boot/kernel root=/dev/sda1 CONSOLE=/dev/tty8"

"init a" prints
...
CONSOLE=/dev/tty8
...
CONSOLE=/dev/tty8
...

kernel line:
"kernel /boot/kernel root=/dev/sda1 INIT_VERSION=111"

command line:
init -e INIT_VERSION=222

"init a" prints
...
INIT_VERSION=111
...
INIT_VERSION=222
...
INIT_VERSION=...
...

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 19 Mar 2012 12:53:08 PM UTCwfinkOpen/ClosedOpen=>Closed
Fri 16 Mar 2012 04:47:20 PM UTCwfinkStatusNone=>Fixed
  Assigned toNone=>wfink

Back to the top


Powered by Savane 3.1-cleanup1