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

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/SSSD.pm 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 ?

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

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

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

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

2 Likes

It’s going to be fixed with

https://github.com/NethServer/dev/issues/5396

Cool, thank :wink: