Solved

Does this indicate a line lenght limitation in inetd.conf ?

Posted on 2004-11-01
1,125 Views
Last Modified: 2013-12-16
I am attempting to start the cvs pserver service.  The following line, placed in /etc/inetd.conf correctly starts the service for the repository 'firmware':

cvspserver3 stream tcp nowait root /sopt/utils/cvs/cvs-1.11.11_solaris/bin/cvs cvs -f --allow-root=/home/mwifi/repository/firmware

However, I have multiple repositories that I would like available through the same pserver service.  So, I add a couple of more repositories to the command in /etc/inetd.conf:

cvspserver3 stream tcp nowait root /sopt/utils/cvs/cvs-1.11.11_solaris/bin/cvs cvs -f --allow-root=/home/mwifi/repository/firmware--allow-root=/ho me/mwifi/repository/drivers --allow-root=/home/mwifi/repository/TestEngineering pserver

This works fine.

HOWEVER, when I add one more repository:

cvspserver3 stream tcp nowait root /sopt/utils/cvs/cvs-1.11.11_solaris/bin/cvs cvs -f --allow-root=/home/mwifi/repository/firmware --allow-root=/ho me/mwifi/repository/drivers --allow-root=/home/mwifi/repository/TestEngineering --allow-root=/home/mwifi/repository/SWCust pserver

The pserver service will not allow anyone to login.  Attempts to login return a consistent error:

cvs -d :pserver:gurhan@dcf401:2403/home/mwifi/repository/firmware login
CVS password:
CVS [login aborted]: unrecognized auth response from [hostname].

The CVS cedarquist user manual says "unrecognized auth response" errors are caused by a bad command line in 'inetd.conf', typically an invalid option or forgetting to put the 'pserver' command at the end of the line.  Another less common problem is invisible control characters that your editor "helpfully" added without you noticing."

I have ruled out invisible control characters.

The command that fails is over 256 characters.
The command that works is under 256 characters.
Solaris5.8 is supposed to have a line limit of 1022 but this does not appear to be holding true with inetd.conf.

Lastly, I rebooted the server starting inetd with the "-l 1022" option, which changes the listener queue length to 1022 characters.  This did not help.

I would deeply appreciate some help.
0
Question by:jrtanenb
    12 Comments
     
    LVL 20

    Expert Comment

    by:tfewster
    If a line in inetd.conf is"broken" for readability  (as you've done in your examples above [Or EE has done for you!]), the last character of each line should be a "\" continuation character, with _no_ spaces after the \;

    To show control characters when editing a file using vi, type  :set list
    You'll then see $ symbols to mark any carriage returns.  The line would then look like this:

    cvspserver3 stream tcp nowait root /sopt/utils/cvs/cvs-1.11.11_solaris/bin/cvs cvs -f  \$ --allow-root=/home/mwifi/repository/firmware --allow-root=/home/mwifi/repository/drivers \$ --allow-root=/home/mwifi/repository/TestEngineering --allow-root=/home/mwifi/repository/SWCust pserver$

    Of course, if there are no line breaks in the line, you won't see any $ symbols apart from after the "pserver"...
    0
     

    Author Comment

    by:jrtanenb
    Thank you for responding.
    Actually, the broken lines are just cut-n-paste errors from my posting.  In inetd.conf I have absolutely confirmed there are no line breaks.  Line breaks have not been the issue.  I apologize for the sloppiness in my posting.

    Again, thank you for responding.
    0
     
    LVL 14

    Expert Comment

    by:chris_calabrese
    Looks like a line length issue to me.

    However, you might actually try splitting into multiple lines with '\' line-continuation as tfewster shows above. Who knows, the problem might only be in the bit that reads inetd.conf, and not the bit that internally represents the lines to go and exec the program being called.
    0
     
    LVL 40

    Expert Comment

    by:jlevie
    "The command that fails is over 256 characters" and that's where the problem lies. The max command line length for /bin/sh (and other shells) is 256 characters.

    One solution to this is to move the repositories to a directory in /, say /CVS. That would allow:

    cvspserver3 stream tcp nowait root /sopt/utils/cvs/cvs-1.11.11_solaris/bin/cvs cvs -f  \
    --allow-root=/CVS/firmware --allow-root=/CVS/drivers \ --allow-root=/CVS/TestEngineering \
    --allow-root=/CVS/SWCust pserver

    which is below the 256 char limit.
    0
     

    Author Comment

    by:jrtanenb
    Yes...I had actually tried a similar strategy using symbolic links.  This helped me to demonstrate the problem was strictly a line-length issue.  The problem I face is that the user community has 12 repositories which I must make available through 1 pserver call (and, therefore, through 1 port).  No matter what I do to shrink the paths, 12 repositories will exceed the 256 character limit.  So, finally, after much pain, and some help from friends, I discovered that a call, in inetd.conf, like this will work:

    cvspserver3 stream tcp nowait root /home/mwifi/cvs_ref/runpserver.sh

    Here is the content of runpserver.sh:

    env -i /utils/bin/cvs [space delimited list of repositories] pserver

    I am, actually, not sure why this works.  However, runpserver.sh returns a result to inetd.conf that does not cause the line limit length to be exceeded.

    Interestingly, the line in runpserver.sh far exceeds the 256 character limit.  From what I have read, the line limit in Solaris is 1022 characters.  However, apparently, for certain utilities like inetd.conf the limit is still 256k.

    Thank you, each, for attempting to assist me.  Even though your proposals did not fully address the problem I was facing, would you accept 100 points each for your efforts?
    0
     
    LVL 14

    Expert Comment

    by:chris_calabrese
    Hmm, good catch on the shell line length.

    In this case, this is something to complain to Sun about, since POSIX says that compatible implementations must have a minimum line length of 4096 for shell lines.
    0
     
    LVL 20

    Expert Comment

    by:tfewster
    No points for me, as I wasn't even in the right ball park!  I'd apologise for querying your original statements, but sometimes the obvious gets overlooked ;-)

    jlevie is a Page Editor, so I think he can reduce the points for you.

    0
     
    LVL 40

    Expert Comment

    by:jlevie
    Yes I can reduce the point total for the question. What would you like it to become?
    0
     

    Author Comment

    by:jrtanenb
    100 points seems fair.
    0
     
    LVL 51

    Accepted Solution

    by:
    points reduced from 500 to 100 'cause questioner provided own solution

    jrtanenb, hope this is as you like, please make your decision for grading or feel free to ask for more assist

    {{ ahoffmann EE Page Editor }}
    0
     

    Author Comment

    by:jrtanenb
    I guess I really do not understand the implications of grading.  What does assigning a grade mean or do for those who answered the question?
    0
     

    Author Comment

    by:jrtanenb
    OK...I guess a grade is not appropriate, here.  Thanks!!
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Suggested Solutions

    In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
    I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

    875 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now