Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1142191

Summary: realm command crashes when no input password
Product: Red Hat Enterprise Linux 7 Reporter: Stef Walter <stefw>
Component: realmdAssignee: Stef Walter <stefw>
Status: CLOSED ERRATA QA Contact: Patrik Kis <pkis>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: ebenes, extras-qa, jhrozek, pkis, stefw, yelley
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: realmd-0.16.0-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1142190 Environment:
Last Closed: 2015-11-19 03:43:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1142190    
Bug Blocks:    

Description Stef Walter 2014-09-16 10:26:53 UTC
+++ This bug was initially created as a clone of Bug #1142190 +++

(gdb) bt
#0  0x00007f2887015679 in prompt_stdin (
    prompt=0x7f2888ff1e90 "Password for admin: ") at tools/realm-client.c:797
#1  build_password_credential (error=0x7fffac434ba0, 
    credential_owner=0x7f2889009861 "administrator", 
    user_name=0x7f2889009828 "admin") at tools/realm-client.c:833
#2  realm_client_build_principal_creds (self=self@entry=0x7f2888fed1d0, 
    membership=membership@entry=0x7f2888ffb580, supported=<optimized out>, 
    user_name=0x7f2889009828 "admin", user_name@entry=0x0, 
    error=error@entry=0x7fffac434ca0) at tools/realm-client.c:897
#3  0x00007f2887016c0c in perform_user_join (client=0x7f2888fed1d0, 
    membership=0x7f2888ffb580, user_name=0x0, options=0x7f2889000390)
    at tools/realm-join.c:153
#4  0x00007f28870172a7 in perform_join (args=<optimized out>, 
    string=<optimized out>, client=<optimized out>) at tools/realm-join.c:234
#5  realm_join (client=0x7f2888fed1d0, argc=2, argv=0x7fffac435088)
    at tools/realm-join.c:301
#6  0x00007f28870134c2 in main (argc=2, argv=0x7fffac435088)
    at tools/realm.c:259
(gdb) p password
$1 = (gchar *) 0x0
(gdb) l
792			password = NULL;
793		}
794	
795		g_printf ("\n");
796	
797		len = strlen (password);
798		if (len > 0 && password[len - 1] == '\n')
799			password[len - 1] = '\0';
800	
801		return password;

realmd-0.15.1-4.fc21.x86_64

Comment 2 Stef Walter 2015-04-14 09:58:06 UTC
Patched upstream.

Comment 5 errata-xmlrpc 2015-11-19 03:43:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-2184.html