| Summary: | GECOS field accepting wrong format | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Varun Mylaraiah <mvarun> |
| Component: | ipa | Assignee: | Martin Kosek <mkosek> |
| Status: | CLOSED NOTABUG | QA Contact: | Namita Soman <nsoman> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.5 | CC: | jhrozek, rcritten |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2013-09-09 10:10:35 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: | |
|
Description
Varun Mylaraiah
2013-09-06 15:16:47 UTC
We have no validator in place on GECOS field, i.e. you can set it to anything you want. But speaking of "wrong format,Redhat", is it really wrong? Wiki says it can be a comma-delimited list. E.g.: # ipa user-add --first=Foo --last=Bar fbar1 --gecos "Foo Bar, Red Hat" ------------------ Added user "fbar1" ------------------ User login: fbar1 First name: Foo Last name: Bar Full name: Foo Bar Display name: Foo Bar Initials: FB Home directory: /home/fbar1 GECOS: Foo Bar, Red Hat Login shell: /bin/sh Kerberos principal: fbar1.BOS.REDHAT.COM Email address: fbar1.bos.redhat.com UID: 470000063 GID: 470000063 Password: False Member of groups: ipausers Kerberos keys available: False # getent passwd fbar1 fbar1:*:470000063:470000063:Foo Bar, Red Hat:/home/fbar1:/bin/sh ... looks OK to me. What seems more troubling to me, is this case: # ipa user-add --first=Foo --last=Bar fbar2 --gecos "Foo Bar:Red Hat" ------------------ Added user "fbar2" ------------------ User login: fbar2 First name: Foo Last name: Bar Full name: Foo Bar Display name: Foo Bar Initials: FB Home directory: /home/fbar2 GECOS: Foo Bar:Red Hat Login shell: /bin/sh Kerberos principal: fbar2.BOS.REDHAT.COM Email address: fbar2.bos.redhat.com UID: 470000064 GID: 470000064 Password: False Member of groups: ipausers Kerberos keys available: False # getent passwd fbar2 fbar2:*:470000064:470000064:Foo Bar:Red Hat:/home/fbar2:/bin/sh Wouldn't it break some programs reading passwd? Jakub, what do you think about this? (In reply to Martin Kosek from comment #2) > We have no validator in place on GECOS field, i.e. you can set it to > anything you want. But speaking of "wrong format,Redhat", is it really > wrong? Wiki says it can be a comma-delimited list. E.g.: > Right, but I've never seen GECOS used as a CSV list. Typically only the real name is present in GECOS. <snip> > # getent passwd fbar2 > fbar2:*:470000064:470000064:Foo Bar:Red Hat:/home/fbar2:/bin/sh > > Wouldn't it break some programs reading passwd? Jakub, what do you think > about this? I would expect *programs* to use an API like getpwnam() to retrieve this information. Shell scripts might break here, yes. But then I'd say it's the fault of the admin. I would expect you can set the colon in the homedir or shell as well. Ok. Seeing this discussion, I think we can treat "gecos" field validation in the same way as general user "cn" attribute validation - i.e. no validation at all, let admin set it to chosen value. Closing as NOTABUG. Please reopen if this is a wrong approach. |