Bug 607733
Summary: | --homedir does not work if parent directory does not exist | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Martin Poole <mpoole> |
Component: | anaconda | Assignee: | Anaconda Maintenance Team <anaconda-maint-list> |
Status: | CLOSED WONTFIX | QA Contact: | Release Test Team <release-test-team-automation> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | 5.5 | CC: | mitr |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2010-10-28 14:02:40 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
Martin Poole
2010-06-24 16:48:04 UTC
What's the traceback? I believe libuser handles all the directory creation in rhel5. Ordinarily, UNIX tools do not automatically create a whole directory structure when given a path ("mkdir" vs. "mkdir -p"); specifying such a path is quite likely to be a typo. In a post-installation environment, luseradd/libuser should thus not create the parent directories automatically, in my opinion. (FWIW, useradd(8) does not create the parent directories either.) This suggests anaconda should create the parent directories. (In reply to comment #4) > Ordinarily, UNIX tools do not automatically create a whole directory structure > when given a path ("mkdir" vs. "mkdir -p"); specifying such a path is quite > likely to be a typo. > > In a post-installation environment, luseradd/libuser should thus not create the > parent directories automatically, in my opinion. (FWIW, useradd(8) does not > create the parent directories either.) > > This suggests anaconda should create the parent directories. Of course, this means that every single tool using libuser is going to have to check and perform these actions, which seems contrary to the entire point of using a library to me. (In reply to comment #5) > Of course, this means that every single tool using libuser is going to have to > check and perform these actions, which seems contrary to the entire point of > using a library to me. No - in particular luseradd uses libuser and should not perform this action IMO. > > Of course, this means that every single tool using libuser is going to have to
> > check and perform these actions, which seems contrary to the entire point of
> > using a library to me.
>
> No - in particular luseradd uses libuser and should not perform this action
> IMO.
Just saying "no" doesn't make it so. The fact is, every program that uses libuser is going to have to take the given home directory, chop off the username part, see if the directory exists, create it if not, and then call into libuser to have it create just the username part. That's just what is going to happen. That duplicates this code and it duplicates error handling.
(In reply to comment #7) > > > Of course, this means that every single tool using libuser is going to have to > > > check and perform these actions, which seems contrary to the entire point of > > > using a library to me. > > > > No - in particular luseradd uses libuser and should not perform this action > > IMO. > > Just saying "no" doesn't make it so. In this case it probably does, because I'm the maintainer of that program :) The reasoning is in comment 4. I might be persuaded to change my opinion, but the claim that creating parent directories automatically is expected of UNIX utilities, and in particular that every user of libuser needs to do it, is just not true I'm afraid. |