[Nagiosplug-devel] [ nagiosplug-Bugs-1986260 ] check_disk_smb and no-user or no-passwd or share with spaces

SourceForge.net noreply at sourceforge.net
Fri Jun 6 12:39:39 CEST 2008


Bugs item #1986260, was opened at 2008-06-06 12:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1986260&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Jan Wagner (cyco_dd)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_disk_smb and no-user or no-passwd or share with spaces

Initial Comment:
The following Bugreport we got against our debian package:

[...]

What that means is that if any of the ARGS contain any character special to the shell (space, tab, nl, "$^&*()[;'#~<>?...) or if they are empty, that will break.
[...]

Next, the check_disk_smb perl script itself has a similar
problem when running the smbclient command.

It runs:

$res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup -U $user $smbclientoptions -I $address -c ls/;

qx/.../ (same as `...`) runs a shell in a same way.

The documentation says that if the password is not passed, it
defaults to "". That is not true above, as $pass expands to
nothing which leaves no argument at all (instead of an empty
argument) so is different from providing with an empty password
or with the -N option.

Also, if the password starts with "-", you're in trouble, that's
why -U $user%$pass may be prefered.

Also, the doc says that if $user is not provided, then it
defaults to "guest" but the problem is that if it is provided
but empty, it is changed to "guest" as well, which prevents us
from querying hosts that don't do user authentication.

You can track the bugreport via http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478942

Thanks and kind regards, Jan.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=1986260&group_id=29880




More information about the Devel mailing list