> >On Fri, 2008-12-05 at 09:27 -0500, Damian Krzeminski wrote: >> Scott Lawrence wrote: >> > On Thu, 2008-12-04 at 16:07 -0500, Raymond Dans wrote: >> >> Recently I submitted a patch (XECS-1852) which provides XML/RPC >> >> interfaces to check for updates, query the system version and to >> >> actually update the software on the system (sipX software only) >> >> using yum. When I tested this on my development machine, >> >> everything worked fine because my user was part of the "wheel" >> >> group and that group was setup to not require a password for root. >> >> >> >> In trying out this capability on an actual ISO, the >commands don't >> >> work because the user "sipxchange" does not have sudo (with no >> >> password) privileges. I assume that this is the case for >this user because of >> >> security. I also tried using the special application >"sipxpackage" >> >> used by SipXConfig with the same result. >> >> >> >> Is there any way around this issue other than putting >sipxchange in >> >> the wheel group and changing the group so that it doesn't >require a >> >> password for root? >> > >> > Write a setuid wrapper program that validates its arguments >> > carefully and then uses them to invoke yum. >> > >> > >> >> Didn't Joe already write all the wrappers that might be needed. Why >> would we need a different set of wrappers when this command >is called >> through XML/RPC and when it's called directly? > >I don't believe it should be any different. >
The problem that I was having with using Joe's python script when implementing the XML/RPC interfaces was that it would always crash due to a Python issue with spawning processes and secondly the script sometimes writes the output to standard out and sometimes to a log file. In order to get around the spawning issue, I had to switch to using "system" to make the calls to execute the yum commands. In addition, I made other changes so that all output is written to stdout and stderr. The last thing was the repositories in the script didn't seem to be correct It would be great if we could use the same script but we would have to agree on the changes that I made to use "system" and to where the output goes. Currently I create 2 files (one for stdout and one for stderr) for each command executed. The files are stored in the var tmp directory and are as follows: Check-update : check-update.output, check-update.err Version : version.output, version.err Update: update.output, update.err The format of the output is pretty much the same as what Joe had except that at the end of each file, I write a string indicating the end and of course "all" output is stored in those files. _______________________________________________ sipx-dev mailing list [email protected] List Archive: http://list.sipfoundry.org/archive/sipx-dev Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
