From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.3-12 i686) Description of problem: There is a bug in the xinetd source that causes xinetd to truncate the list of environment variables. The bug occurs if xinetd attempts to grow the environment variable list. What happens is that after growing the list, xinetd attempts to set to NULL all new variable pointers; unfortunately, there is an off-by-one error in the indexing that causes it to set to NULL the last set environment variable. As all new environment variables are added after this, they will never be seen by the exec'ed child (the env var list is NULL- terminated). Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Modify the xinetd configuration file for one of the services that must be exec'ed. 2. Add several new environment variables to be passed to the service (say 30, just to be safe). 3. strace xinetd and then contact the service. You will notice in the strace that the exec of the service does not contain all the environment variables that you added. Actual Results: some environment variables are missing from the environment of the child server. Expected Results: all specified additional environment variables should have been present. Additional info: The bug lies in libs/src/misc/m_env.c:grow(). The memset() at the end of the function should begin at index &ep->vars[ep->n_vars], not at &ep->vars[ep->n_vars-1]. The actual size of this array at any point in time is ep->max_vars + 1.
The change looks sane to me... bbraun, any comments??
Looks fine. It's included in the current development release. Can someone try the latest development version at http://www.xinetd.org/devel and see if you still have the problem. Should be fixed, but a verification would be good.
An rpm can be found at http://people.redhat.com/teg/xinetd/ - can the reporter test it?
I've checked the rpm/srpm that you prepared. The source contains the fix, and testing on my machine shows the problem solved.