Bug 303971
Summary: | Validation of 'Home Directory' within Create/Modify user | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | ray hammond <ray.hammond77> |
Component: | system-config-users | Assignee: | Nils Philippsen <nphilipp> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 9 | CC: | mitr, triage |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-07-14 18:13:38 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
ray hammond
2007-09-24 20:36:08 UTC
I've added guards against some problems with the home directory to s-c-users upstream: - non-absolute dirs (i.e. not beginning with a slash) - dirs containing empty ("/home//foo") or illegal or undesirable ("/home/../foo", "/home/./foo") path components - path components which are too long ("/home/<more than 255 characters>/foo") Contrary to what you say, tildes, backticks, asterisks and other "special" characters are permissible as home directories (except the colon as it's used as the field separator in /etc/passwd) and I've tried it out and confirmed that these work if the rules above are kept in mind (tried it with "/home/blah~", /home/blah`", "/home/rm -rf *"). "... permissible in home directories ..." even. I've built system-config-users-1.2.69-1.fc8 for Rawhide, but I'll wait a while to pick up translations before I'll build (a later version) for F7. It would be good if you could try out whether 1.2.69 from Rawhide fixes things for you in the meantime. I have just tested the reported bug using version 1.2.72 on Fedora 8 Test 3. I managed to find the following. 1) Open system-config-users. 2) Click create new user 3) Enter the 'User Name' as kate 4) Leave 'Full Name' blank. 5) Enter 'Password' as password and re-enter to confirm. 6) Ensure 'Create home directory' is checked. 7) Enter 'Home directory' as "/home/kate;rm -rf /*" 8) Press OK. The utility creates the user without any warnings. If you open a shell, as root, and type 'su - kate' you get the following warning. su warning: cannot change directory to /home/kate;`rm -rf /*`: No such file or directory. (In reply to comment #4) > The utility creates the user without any warnings. If you open a shell, as > root, and type 'su - kate' you get the following warning. > > su warning: cannot change directory to /home/kate;`rm -rf /*`: No such file or > directory. Ray, after you created the user, was there a directory "/home/kate;`rm -rf /*`"? Mirek, do you know about limitations/regulations which prohibited such ludicrous paths for home directories or do you think we shall assume that this behaviour is a bug in su, pam or the login scripts? The directory is not created. Additionally, the shell in which I started the utility has the following error: Traceback (most recent call last): File "/usr/share/system-config-users/userWindow.py", line 398, in on_userWin_ ok_button_clicked self.parent.ADMIN.addUser(userEnt, mkhomedir = True) RuntimeError: Error creating `/home/kate;`rm -rf /*`': No such file or director y (In reply to comment #6) > The directory is not created. > > Additionally, the shell in which I started the utility has the following error: > > Traceback (most recent call last): > File "/usr/share/system-config-users/userWindow.py", line 398, in on_userWin_ > ok_button_clicked > self.parent.ADMIN.addUser(userEnt, mkhomedir = True) > RuntimeError: Error creating `/home/kate;`rm -rf /*`': No such file or > directory This is something different -- it tries to create a directory "*`" beneath "kate;`rm -rf " in /home which doesn't exist. As it is, system-config-users can only create home directories in already existing directories and fails badly (with the traceback you've seen) if they don't. I'll clone this bug for that problem. If you don't have additional slashes in the home directory, does it work then? Without the last forward slash the directory is created without any problems. This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists. Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs: http://docs.fedoraproject.org/release-notes/ The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping The problem still exists in Fedora 9. This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '9'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 9's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 9 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Is there any other issue from this not resolved besides what is described in the clones bug #346491, i.e. that it fails to create missing parent directories? Fedora 9 changed to end-of-life (EOL) status on 2009-07-10. Fedora 9 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. Thank you for reporting this bug and we are sorry it could not be fixed. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |