Bug 459553 - Mistake in parse parameter server_args with string quoting.
Mistake in parse parameter server_args with string quoting.
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xinetd (Show other bugs)
5.2
i386 Linux
medium Severity low
: rc
: ---
Assigned To: Jan Safranek
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-19 20:41 EDT by Andrey
Modified: 2008-08-21 07:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-08-21 07:33:54 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Andrey 2008-08-19 20:41:32 EDT
Description of problem:
Mistake in parse parameter server_args with string quoting.

Version-Release number of selected component (if applicable):
xinetd-2.3.14-10.el5

How reproducible:
always

Steps to Reproduce:
1. small C program:
#include <stdio.h>

int main(int argc, char *argv[])
{
    char **c = &argv[0];

    for(;*c;++c) printf("arg: %s\n", *c);

   return 0;
}

example:
./test 1 2 3 "4 5 6" 7
arg: ./test
arg: 1
arg: 2
arg: 3
arg: 4 5 6
arg: 7

2. config for xinetd:
service acr-nema
{
    disable = no
    socket_type     = stream
    wait            = no
    user            = nobody
    server          = /opt/test
    server_args     = 1 2 3 "4 5 6" 7
}

3. check: telnet 127.0.0.1 104

Actual results:
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
arg: /opt/test
arg: 1
arg: 2
arg: 3
arg: "4
arg: 5
arg: 6"
arg: 7
Connection closed by foreign host.


Expected results:
arg: /opt/test
arg: 1
arg: 2
arg: 3
arg: 4 5 6
arg: 7


Additional info:
Comment 1 Jan Safranek 2008-08-21 07:33:54 EDT
I don't think xinetd has ever claimed that double quotes in the configuration file are interpreted anyhow, your assumption that it encapsulates one argument which can contain spaces is IMHO wrong.

Note You need to log in before you can comment on or make changes to this bug.