bugSystem V style init programs - Bugs: bug #35858, init doesn't delete variables from...

 
 

bug #35858: init doesn't delete variables from extra environment

Submitted by:  None
Submitted on:  Thu 15 Mar 2012 09:15:05 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:46:25 PM UTC, comment #1:

Should be fixed in svn repository. Side effect after re-execute
is that any extra environment variable becomes a standard
environment variable.

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

init version: 2.88dsf

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

For example, if I execute command lines
init -e INIT_MY=234
init -e INIT_MY

"init a" prints
...
INIT_MY=234
...

I didn't run init.c under debugger, but I discovered that pointer p in function initcmd_setenv points after '\0', so we'll get sz+1 when "=" is absent.

> data = ++p;
>
> sz = eq ? (eq - env) : (p - env);


I didn't check this. Maybe I'm not right.

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:52:43 PM UTCwfinkOpen/ClosedOpen=>Closed
Fri 16 Mar 2012 04:46:25 PM UTCwfinkStatusNone=>Fixed
  Assigned toNone=>wfink

Back to the top


Powered by Savane 3.1-cleanup1