mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
afs: Leave cellnum alone for explicit mtpt cell
When a mountpoint is given an explicit cell, don't alter cellnum. Cellnum represents the cell for the parent, and is used for determining whether or not we're crossing a cell boundary. Previously, this code forced the mount point to always be treated as foreign (for a mountpoint prefixed with a cell name), or to always be treated as local (for a mountpoint prefixed with a cell number). Change-Id: I7b98ccc94bf61dc3d7be0b7d6b54019cd797e884 Reviewed-on: http://gerrit.openafs.org/6051 Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
51f71e533b
commit
e14dec55e6
@ -67,14 +67,14 @@ EvalMountData(char type, char *data, afs_uint32 states, afs_uint32 cellnum,
|
|||||||
/* Start by figuring out and finding the cell */
|
/* Start by figuring out and finding the cell */
|
||||||
cpos = afs_strchr(data, ':'); /* if cell name present */
|
cpos = afs_strchr(data, ':'); /* if cell name present */
|
||||||
if (cpos) {
|
if (cpos) {
|
||||||
|
afs_uint32 mtptCellnum;
|
||||||
volnamep = cpos + 1;
|
volnamep = cpos + 1;
|
||||||
*cpos = 0;
|
*cpos = 0;
|
||||||
if ((afs_strtoi_r(data, &endptr, &cellnum) == 0) &&
|
if ((afs_strtoi_r(data, &endptr, &mtptCellnum) == 0) &&
|
||||||
(endptr == cpos))
|
(endptr == cpos)) {
|
||||||
tcell = afs_GetCell(cellnum, READ_LOCK);
|
tcell = afs_GetCell(mtptCellnum, READ_LOCK);
|
||||||
else {
|
} else {
|
||||||
tcell = afs_GetCellByName(data, READ_LOCK);
|
tcell = afs_GetCellByName(data, READ_LOCK);
|
||||||
cellnum = 0;
|
|
||||||
}
|
}
|
||||||
*cpos = ':';
|
*cpos = ':';
|
||||||
} else if (cellnum) {
|
} else if (cellnum) {
|
||||||
|
Loading…
Reference in New Issue
Block a user