Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > how to change the effective user identficator

Reply
Thread Tools

how to change the effective user identficator

 
 
Daneel Yaitskov
Guest
Posts: n/a
 
      07-20-2008
Hi,


I can't change the EUID of a perl process which performs a perl script.
I used the manual perlsec and wrote the script:

#!/usr/bin/perl

use English '-no_match_vars';

$EUID = 0;
open(THEFILE, ">/var/log/messages") || die "can't open file";
print "The file was opened\n";
#end of the script

The script file has the rights:
$chown root:root test.pl
$chmod a+xs test.pl
The script gives the error "can't open file"


Daneel
 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      07-20-2008
[Forwarding to CLPM because CLP is obsolete]

Daneel Yaitskov <(E-Mail Removed)> wrote:
>I can't change the EUID of a perl process which performs a perl script.
>I used the manual perlsec and wrote the script:
>
>#!/usr/bin/perl
>
>use English '-no_match_vars';
>
>$EUID = 0;
>open(THEFILE, ">/var/log/messages") || die "can't open file";
>print "The file was opened\n";
>#end of the script
>
>The script file has the rights:
>$chown root:root test.pl
>$chmod a+xs test.pl
>The script gives the error "can't open file"
>
>
>Daneel

 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      07-20-2008
[Forwarding to CLPM because CLP is obsolete]

Daneel Yaitskov <(E-Mail Removed)> wrote:
>I can't change the EUID of a perl process which performs a perl script.
>I used the manual perlsec and wrote the script:
>
>#!/usr/bin/perl
>
>use English '-no_match_vars';
>
>$EUID = 0;
>open(THEFILE, ">/var/log/messages") || die "can't open file";
>print "The file was opened\n";
>#end of the script
>
>The script file has the rights:
>$chown root:root test.pl
>$chmod a+xs test.pl
>The script gives the error "can't open file"
>
>
>Daneel

 
Reply With Quote
 
Daneel Yaitskov
Guest
Posts: n/a
 
      07-20-2008
Jürgen Exner wrote:
> [Forwarding to CLPM because CLP is obsolete]



I don't know what is CLPM. I didn't find definition of CLPM or CLP in
manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
about it.



Daneel
 
Reply With Quote
 
Daneel Yaitskov
Guest
Posts: n/a
 
      07-20-2008
Jürgen Exner wrote:
> [Forwarding to CLPM because CLP is obsolete]



I don't know what is CLPM. I didn't find definition of CLPM or CLP in
manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
about it.



Daneel
 
Reply With Quote
 
Jürgen Exner
Guest
Posts: n/a
 
      07-20-2008
Daneel Yaitskov <(E-Mail Removed)> wrote:
>Jürgen Exner wrote:
>> [Forwarding to CLPM because CLP is obsolete]

>
>
>I don't know what is CLPM. I didn't find definition of CLPM or CLP in


comp.lang.perl.misc

comp.lang.perl has been rmgroup'ed and replaced with the
comp.lang.perl.* hierarchy over a decade ago.

>manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
>about it.


perldoc -q usenet

jue
 
Reply With Quote
 
Jürgen Exner
Guest
Posts: n/a
 
      07-20-2008
Daneel Yaitskov <(E-Mail Removed)> wrote:
>Jürgen Exner wrote:
>> [Forwarding to CLPM because CLP is obsolete]

>
>
>I don't know what is CLPM. I didn't find definition of CLPM or CLP in


comp.lang.perl.misc

comp.lang.perl has been rmgroup'ed and replaced with the
comp.lang.perl.* hierarchy over a decade ago.

>manuals: perl, perltoc and perldoc CLPM. Please, hint where can I read
>about it.


perldoc -q usenet

jue
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
how to change the effective UID Daneel Yaitskov Perl Misc 6 07-30-2008 03:06 PM
Re : Java, JNI and UNIX root effective user id Phill Tadman Java 4 10-19-2003 03:19 PM
get effective and real user-ids in a setuid program in linux vimala C Programming 1 08-01-2003 03:29 AM



Advertisments