CGI setuid programs

2012-05-11 Thread Tessio Fechine
Hello, Everywhere I read about cgi setuid programs says that it is wrong and must never be done, but nobody says how to circumvent the need of it. In my case, I need to read a password from a protected file (read only, owned by root) to connect to a database. How can I do this without running setui

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Tessio Fechine
2011/12/15 Mark Tiesman > Hi all. I recently started a job that at some point is going to require > me knowing and using Perl. I am pretty green as a programmer and need some > guidance to get me going on the right foot. Currently I am reading the > Llama book to grease the skids so to speak,

ipc question

2011-12-14 Thread Tessio Fechine
Hello, I have a cgi application that has a two way communication with a ldap application via open2: |home.cgi| <===> |ldap.pl| I need to keep communicating with the same ldap.pl process as other cgi scripts are launched: |home.cgi| xxx |ldap.pl| <===> |admin.cgi| I don't know how

Re: open bug?

2011-12-08 Thread Tessio Fechine
2011/12/8 John W. Krahn > Tessio Fechine wrote: > >> Hello, >> > > Hello, > > I have a perl script that uses Net::LDAP to query an directory service. It >> is invoked like this: >> >> --- >> search.pl '(cn=peter*)' >> --- &g

Re: open bug?

2011-12-08 Thread Tessio Fechine
2011/12/8 Shlomi Fish > On Thu, 8 Dec 2011 16:42:45 -0300 > Tessio Fechine wrote: > > > Hello, > > I have a perl script that uses Net::LDAP to query an directory service. > It > > is invoked like this: > > > > --- > > search.pl '(cn=peter*)

open bug?

2011-12-08 Thread Tessio Fechine
Hello, I have a perl script that uses Net::LDAP to query an directory service. It is invoked like this: --- search.pl '(cn=peter*)' --- Today I started another perl script that works on top of search.pl. It opens search.pl with a piped open, and them process the results. But I accidentally found

Re: Taint mode CGI problem

2011-11-12 Thread Tessio Fechine
18 -0300, Tessio Fechine wrote: > > #!/usr/bin/perl -T -w > > > > use strict; > > use CGI; > > > > $ENV{PATH} = '/var/www/cgi-bin/'; > > my $exec = 'search.pl'; > > > > > > my $c = CGI->new(); > > print $c-&

Taint mode CGI problem

2011-11-11 Thread Tessio Fechine
Hello, I have this CGI script: ---//--- #!/usr/bin/perl -T -w use strict; use CGI; $ENV{PATH} = '/var/www/cgi-bin/'; my $exec = 'search.pl'; my $c = CGI->new(); print $c->header(), $c->start_html(-title => "It's alive!\n"), "\n"; my $search = $c->param('search') || 'nobody'; !system $exec, "(

Re: Can't delete directory entry in AD using Net::LDAP

2011-10-27 Thread Tessio Fechine
Thanks a lot! Also searching for "ERROR_DS_REFERRAL" gave me a lot of information about Windows/AD errors. 2011/10/27 Rob Dixon > On 26/10/2011 23:01, Tessio Fechine wrote: > >> Hello, >> I'm trying to delete a user entry in Active Directory using this code: &

Can't delete directory entry in AD using Net::LDAP

2011-10-26 Thread Tessio Fechine
Hello, I'm trying to delete a user entry in Active Directory using this code: #!/usr/bin/perl -w use strict; use Net::LDAP; my $server = '192.168.56.1'; my $port = '389'; my $mesg; my $c = Net::LDAP->new($server, port => $port) or die "Unable to connect to $server: $@\n"; my $binddn = "c

Map users to computers in a AD domain

2011-10-24 Thread Tessio Fechine
Hello, I'm trying to map users to their respective current working computers in a Active Directory domain. I thought about using Net::LDAP to query users (cn=*,cn=users,dc=example,dc=com) and computers (cn=*,cn=computers,dc=example,dc=com) entries information , and then map each pair of user/compu

Re: grep question

2011-07-19 Thread Tessio Fechine
Hello, you can use print "all the same" unless (grep {! /test_name/} @bin); 2011/7/19 Steven Surgnier > Hi, > > I desire a concise conditional statement which simply checks if each entry > in an array matches a given string. For example: > > print "all the same" if (grep {m/test_name/} @bins)

redirect system command STDER

2011-07-19 Thread Tessio Fechine
Hello, I have a subroutine that uses useradd to create accounts -- @cmd = ('useradd', '-m', $account); my $result = system @cmd; -- but when useradd fails, I need to stop it from sending the error message to STDER. Is it possible with system? Thanks!