ptserver: Remove duplicate ubik_SetLock in listSuperGroups 38/14338/3
authorJan Iven <iven.jan@gmail.com>
Tue, 1 Sep 2020 12:51:25 +0000 (14:51 +0200)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 4 Sep 2020 03:00:31 +0000 (23:00 -0400)
It looks like a call to ubik_SetLock(.. LOCKREAD) was left in
place in listSuperGroups after locking was moved to ReadPreamble
in commit a6d64d70 (ptserver: Refactor per-call ubik initialisation)
When compiled with 'supergroups', and once contacted by
"pts mem -expandgroups ..", ptserver will therefore abort() with
Ubik: Internal Error: attempted to take lock twice
This patch removes the superfluous ubik_SetLock.

FIXES 135147

Change-Id: I8779710a6d68e4126fc482123b576690d86e4225
Reviewed-on: https://gerrit.openafs.org/14338
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/ptserver/ptprocs.c

index f663b22..5eb1ac7 100644 (file)
@@ -1787,10 +1787,6 @@ listSuperGroups(struct rx_call *call, afs_int32 aid, prlist *alist,
     if (!pr_noAuth && restrict_anonymous && *cid == ANONYMOUSID)
        ABORT_WITH(tt, PRPERM);
 
-    code = ubik_SetLock(tt, 1, 1, LOCKREAD);
-    if (code)
-       ABORT_WITH(tt, code);
-
     temp = FindByID(tt, aid);
     if (!temp)
        ABORT_WITH(tt, PRNOENT);