You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Home folder variations to investigate / use getHome() instead of root view #14770
Recently I heard that the LDAP admin settings make it possible to specify the format of the name of the home folder.
However there are many places in the code that assume that the home folder is always in the format "$datadir/$userId". This is mostly when a root view is used, then it concatenated the user name instead of using getHome().
We need to check whether these parts are compatible. I suspect this is likely to break...
changed the title [-]Home folder variations to investigate[/-][+]Home folder variations to investigate / use getHome() instead of root view[/+]on Mar 9, 2015
In setupFS the user folder as returned by getHome by the corresponding backend is mounted as $datadir/$userId so that subsequent views etc. to $datadir/$userId resolve just fine.
Also, getHome() is never expected to be called from anywhere else than setupFS. (I have gotten it wrong back then when this stuff was introduced and also thought this way. There were ways to circumvent/directly access files, which broke.)
So if I understand well, this means that if someone creates a root view and forgets to do setupFS for a given user, then the home will not be mounted properly.
So let's say setupFS('uuid') would mount the uuid folder onto "$datadir/userid". If someone uses a root view but forgets to call setupFS('uuid'), then the view will be looking for a real folder "$datadir/userid" instead of the mounted one.
This sounds very similar to what I observed with @Elethiomel on IRC yesterday.
While looking at the encryption migration code, I noticed that setupFS() only worked for the first user, because subsequent calls would have $fsExists already true. Will raise separately.
setupFS should be called as early as possible of course, and I am not aware of any issues… which does not mean that there are none or were re-introduced.
While looking at the encryption migration code, I noticed that setupFS() only worked for the first user, because subsequent calls would have $fsExists already true. Will raise separately.
In that case we indeed need to tearDownFS() it before setting it up for another user. It resets the fsSetup marker.
Activity
[-]Home folder variations to investigate[/-][+]Home folder variations to investigate / use getHome() instead of root view[/+]blizzz commentedon Mar 9, 2015
In setupFS the user folder as returned by getHome by the corresponding backend is mounted as $datadir/$userId so that subsequent views etc. to $datadir/$userId resolve just fine.
blizzz commentedon Mar 9, 2015
Also, getHome() is never expected to be called from anywhere else than setupFS. (I have gotten it wrong back then when this stuff was introduced and also thought this way. There were ways to circumvent/directly access files, which broke.)
PVince81 commentedon Mar 10, 2015
So if I understand well, this means that if someone creates a root view and forgets to do setupFS for a given user, then the home will not be mounted properly.
So let's say setupFS('uuid') would mount the uuid folder onto "$datadir/userid". If someone uses a root view but forgets to call setupFS('uuid'), then the view will be looking for a real folder "$datadir/userid" instead of the mounted one.
This sounds very similar to what I observed with @Elethiomel on IRC yesterday.
While looking at the encryption migration code, I noticed that setupFS() only worked for the first user, because subsequent calls would have
$fsExistsalready true. Will raise separately.blizzz commentedon Mar 10, 2015
setupFS should be called as early as possible of course, and I am not aware of any issues… which does not mean that there are none or were re-introduced.
In that case we indeed need to tearDownFS() it before setting it up for another user. It resets the fsSetup marker.
PVince81 commentedon Mar 10, 2015
Raised ticket for missing tearDownFS() here: #14775
blizzz commentedon Aug 7, 2015
tearDown is implemented, we can close. Reopen, if not.