Re: Perl File::Copy / Upload host cert is broken somehow
Eric Oberlander <[email protected]> Fri, 17 May 2013 17:14:33 +0100
| Newsgroups | gmane.comp.security.ipcop.devel |
|---|---|
| Message-ID | <CAPkz44HvonsJPPNRfC1P8mVpKnzagB-zbKiNKdKrikCrswLOeA@mail.gmail.com> |
On 17 May 2013 08:24, Achim Weber <[email protected]> wrote: > Hi! > > I noticed the Perl File::Copy is broken. In current 2.1.1 I'm no more able > to > upload a host cert when configuring an Ipsec vpn connection. I always get > an > errormessage "Certificate file move failed: ", see screenshot [1]. > > The corresponding code is in ipsec.cgi line 718: > ------------------------ Code start ----------------------------------- > move($filename, "/var/ipcop/certs/$cgiparams{'NAME'}cert.pem"); > if ($? ne 0) { > $errormessage = "$Lang::tr{'certificate file move failed'}: $!"; > unlink ($filename); > goto VPNCONF_ERROR; > } > ------------------------ Code end ------------------------------------- > Here $? is always '512', normally move() should return with 1 or 0 [2]. > Also > the file was successfully moved (or at least copied), I can see the file > in /var/ipcop/certs/! And the reason $! is empty! > > It seams there is a system call inside move() which is failing(?) [3][4], I > don't know. > > This issue is not present in 2.0.6 and it is not a local problem by my > because > those .iso's from Olaf are also showing the same behavior. I have tried to > identify the SVN commit which broke it but was not successful. I have > compiled > around 15 different svn revs but didn't found it. > > Here are my results from the latest builds: > Build order | SVN Rev | Error avail.? > ------------|-----------|--------------- > 1 | 6903 | Error avail. > 2 | 6902 | Error avail. > 3 | 6863 | OK, no Error > 4 | 6864 | OK, no Error > 5 | 6882 | OK, no Error > 6 | 6883 | OK, no Error > 7 | 6899 | OK, no Error > 8 | 6900 | OK, no Error > 9 | 6901 | OK, no Error > 10 | 6902 again| OK, no Error now! > 11 | 7031 | Error avail. > > I did always "svn up -r nnnn, make.sh clean, make.sh prefetch, make.sh > build" > between every build. Before the latest 7031 build I additionally did a > "make.sh > ccach_clean, make.sh toolchain" before the build. > > I'm very confused what to do now. Any Ideas? > > Buildmachine is an up-to-date Debian 6 (Squeeze). IIRC Olaf is also > building > on Debian 6? > > Achim > > > [1] http://s1.directupload.net/images/130517/b279tmdq.png > [2] http://perldoc.perl.org/File/Copy.html#RETURN > [3] http://www.perlmonks.org/?node_id=818402 > [4] http://perldoc.perl.org/functions/system.html > > > Hi Achim Are the permissions on the /var/ipcop/ca or /var/ipcop/certs directories unusual in any way? They are owned by nobody:nobody on my system. Eric ------------------------------------------------------------------------------ AlienVault Unified Security Management (USM) platform delivers complete security visibility with the essential security capabilities. Easily and efficiently configure, manage, and operate all of your security controls from a single console and one unified framework. Download a free trial. http://p.sf.net/sfu/alienvault_d2d _______________________________________________ IPCop-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ipcop-devel