Dear Mark,

It's not a question of how big - someone will always exceed the limit :)
It's the technique employed.  I appreciate you are trying to reuse
secure code 
by enforcing an arbitrary limit on popen calls but the list itself is
internally constructed and therefore should be considered secure,
_possibly_ bypassing this restriction.  I know that buffer overruns are
a serious problem in secure
software and hence I understand why this limit is in place.

I'll probably get around it by dumping an iterated list to a temporary
file that is constructed on the fly and parsing that to a yum/RPM
command.  Convoluted but
it's questionable whether I should be using cfengine for this task
anyway.
Another option is to use package groups instead but that requires
changes in
my yum/yam repository.

I could easily get around it by recompiling with a 'large enough'
CF_MAXARGUMENTS
but that would likely have other implications (memory and stack usage
primarily).
So I would prefer not to do that unless absolutely necessary.

I was hoping that someone had come across this before but obviously not.
I'll keep you posted.

Thanks for your help.

Best Regards,

Brett

-----Original Message-----
From: Mark Burgess [mailto:[EMAIL PROTECTED] 
Sent: 14 July 2006 11:58
To: Brett Delle Grazie
Cc: help-cfengine@cfengine.org
Subject: Re: Package installation of RPMs - Too many arguments in
embedded script

[EMAIL PROTECTED] wrote:
> Dear Steve,
> 
> Thanks for that.  It does appear that it's cfengine imposing the limit

> way before it gets anywhere near yum. Looking at the source the issue 
> is in popen.c where it imposes the limit of CF_MAXSHELLARGS (which is 
> set to 30).  I can see why this is done (to limit memory/stack usage) 
> but it does break the package
> 
> mechanism rather thoroughly.
> 
> Best Regards,
> 
> Brett
> 
> -----Original Message-----
> From: Steve Kemp [mailto:[EMAIL PROTECTED]
> Sent: 14 July 2006 11:18
> To: Brett Delle Grazie
> Cc: help-cfengine@cfengine.org
> Subject: Re: Package installation of RPMs - Too many arguments in 
> embedded script
> 
> On Fri, Jul 14, 2006 at 10:56:40AM +0100, 
> [EMAIL PROTECTED] wrote:
> 
>>    I'm using Yum so my rpm install command is:
>>     
>>    RPMInstallCommand = ( "/usr/bin/yum -y install %s" )
>>     
>>    However I'm getting the messages (in verbose mode):
> 
>>    ... long list of packages ...
>>    package install: cfengine:build-test: Too many arguments in
> embedded
>>    script
> 
>>    Does anyone have a work around for this already (i.e. probably
> using
>>    shellcommands)?
> 
>   Perhaps something like:
> 
>     /bin/echo %s | xargs --max-args 20 /usr/bin/yum -y install \{\} \;
> 
>   That would split up the package installation to only attempt 20 at  
> a time.  Of course then you might have dependency problems if the  
> first 20 packages depend on something to be installed in the next  20
..
> 
> Steve


How big do you think this arg list should be to help you out?

--
Mark Burgess

Professor of Network and System Administration Oslo University College

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Work: +47 22453272            Email:  [EMAIL PROTECTED]
Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

_______________________________________________
Help-cfengine mailing list
Help-cfengine@cfengine.org
http://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to