Name "NethServer::SSSD::OLDIN" used only once

(Stéphane de Labrusse) #1

I’m working on a feature to enable/disable the shell access with nethserver-dc as a user provider, and when in the file /etc/e-smith/events/actions/nethserver-dc-user-modify , I create the new object of NethServer::SSSD I have the below error

Name "NethServer::SSSD::OLDIN" used only once: possible typo at /usr/share/perl5/vendor_perl/NethServer/ line 302

My code is

#!/usr/bin/perl -w
use strict;
use Errno;
use NethServer::SSSD;

my $event = shift;
my $userName = shift;
my $FullName = shift;
my $shell = shift || '/usr/libexec/openssh/sftp-server';

my $sssd = new NethServer::SSSD();
my $bindPassword = $sssd->bindPassword();
my $baseDN = $sssd->baseDN();
my $bindDN = $sssd->bindDN();
my $host = $sssd->host();

the error comes from #!/usr/bin/perl -w , if I remove the warning tag, all is workable

- #!/usr/bin/perl -w
+ #!/usr/bin/perl

what’s wrong doc ?

(Markus Neuberger) #2

There’s no warning anymore if you add “*OLDIN if 0;” at line 303 in /usr/share/perl5/vendor_perl/NethServer/ but is it ok that OLDIN was just used once?

open(OLDIN, "<&STDIN");
*OLDIN if 0;
open(STDIN, "<&RH");

(Giacomo Sanchietti) #3

Looking ad the code, I think it’s a false notice and we can leave it as is. @davidep what do you think?

(Stéphane de Labrusse) #4

@davidep , just a reminder that with the code I propose, there is a log notice

(Davide Principi) #5

It’s going to be fixed with

(Stéphane de Labrusse) #6

Cool, thank :wink:

(Davide Principi) #7