[OpenAFS] Bug in pts/ptserver: createuser with a negative id works
Phillip Moore
w.phillip.moore@gmail.com
Fri, 15 Oct 2010 15:05:20 -0400
--0015175cda040391d90492ac8284
Content-Type: text/plain; charset=ISO-8859-1
While adding test cases for failures in the AFS::Command::PTS test suite, I
noticed the following unexpected results:
[root@rpcore ~]# pts createuser -name fakeafscmduser -id -1010 -cell
a.rp.nyc.us.test.efs
User fakeafscmduser has id -1010
[root@rpcore ~]# pts creategroup -name fakeafscmdgroup -id 510 -cell
a.rp.nyc.us.test.efs
pts: argument illegal or out of range because group id 510 was not negative
At the very least, this assymetry suggests that one these is wrong. My vote
is that createuser is broken, and should be producing the same type of error
as creategroup does when the opposite mistake is made.
The resulting pts ID looks like a normal group, FWIW:
[root@rpcore ~]# pts examine fakeafscmduser
Name: fakeafscmduser, id: -1010, owner: afsadmin, creator: afsadmin,
membership: 0, flags: S-M--, group quota: 0.
This is using OpenAFS 1.5.77, and I don't have handy access to an older cell
to test this.
--0015175cda040391d90492ac8284
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
While adding test cases for failures in the AFS::Command::PTS test suite, I=
noticed the following unexpected results:<div><br></div><div><div>[root@rp=
core ~]# pts createuser -name fakeafscmduser -id -1010 -cell a.rp.nyc.us.te=
st.efs</div>
<div>User fakeafscmduser has id -1010</div><div>[root@rpcore ~]# pts create=
group -name fakeafscmdgroup -id 510 -cell a.rp.nyc.us.test.efs</div><div>pt=
s: argument illegal or out of range because group id 510 was not negative</=
div>
</div><div><br></div><div>At the very least, this assymetry suggests that o=
ne these is wrong. =A0My vote is that createuser is broken, and should be p=
roducing the same type of error as creategroup does when the opposite mista=
ke is made.</div>
<div><br></div><div>The resulting pts ID looks like a normal group, FWIW:</=
div><div><br></div><div><div>[root@rpcore ~]# pts examine fakeafscmduser</d=
iv><div>Name: fakeafscmduser, id: -1010, owner: afsadmin, creator: afsadmin=
,</div>
<div>=A0=A0membership: 0, flags: S-M--, group quota: 0.</div></div><div><br=
></div><div>This is using OpenAFS 1.5.77, and I don't have handy access=
to an older cell to test this.=A0</div>
--0015175cda040391d90492ac8284--