Bug 1006260 - Account provider: creation of super long char user ends with error unauthorized instead of error too-long
Summary: Account provider: creation of super long char user ends with error unauthoriz...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: openlmi-providers
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Roman Rakus
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 922084
TreeView+ depends on / blocked
 
Reported: 2013-09-10 10:34 UTC by Petr Sklenar
Modified: 2014-01-13 00:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-10 14:04:01 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Petr Sklenar 2013-09-10 10:34:52 UTC
Description of problem:
Creation of super long char user ends with error unauthorized instead of error too-long.

Version-Release number of selected component (if applicable):
openlmi-account-0.1.1-2.el7.x86_64

How reproducible:
always

Steps to Reproduce:
def setUp(self):
        self.conn = lmishell.connect(HOST, USER, PASSWD)
        self.assertTrue(isinstance(self.conn, lmishell.LMIConnection), "Couldn't connect to remote provider")
        self.cs = self.conn.root.cimv2.Linux_ComputerSystem.first_instance()
        self.lams = self.conn.root.cimv2.LMI_AccountManagementService.first_instance()


def test(self)
        # create 32char user
        myuser = "32charabcdefghijklmnopqrstuvwxyz"
        user = self.lams.CreateAccount(Name=myuser, System=self.cs)
        self.assertEqual(user.rval, -1)
        self.assertTrue('name is too long' in user.errorstr)

# this is OK, it ends with the right error message ^^

        # try to create too long user
        myuser = "superman" * 9999999
        user = self.lams.CreateAccount(Name=myuser, System=self.cs)
        print user
        self.assertEqual(user.rval, -1)
        self.assertTrue('name is too long' in user.errorstr)

Actual results:
unauthorized

Expected results:
name is too long

Additional info:
/var/log/message

Sep 10 06:33:02 pes-guest-90 cimserver[25085]: pam_unix(wbem:auth): authentication failure; logname= uid=0 euid=0 tty=wbemLocal ruser= rhost=  user=root
Sep 10 06:33:02 pes-guest-90 cimserver[25085]: pam_succeed_if(wbem:auth): requirement "uid >= 1000" not met by user "root"
Sep 10 06:33:04 pes-guest-90 cimserver[25085]: pam_authenticate failed: Authentication failure
Sep 10 06:33:05 pes-guest-90 cimserver[25085]: PAM authentication failed for local user: root

Comment 2 Roman Rakus 2013-09-10 14:04:01 UTC
Looks like you have bad password. I can't reproduce it.


Note You need to log in before you can comment on or make changes to this bug.