RHEL-21049: [1.28] Fix issue with registration using gsd-subman #3367
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
2225443: [1.28] Hotfix of D-Bus policy #3318
socket using
Start()
on interfacecom.redhat.RHSM1.RegisterServer
and destroy it later using
Stop()
. This abstract socketcould be later used by root user for calling e.g.
Register()
on interface
com.redhat.RHSM1.Register
. This is way howit works for
gsd-subman
(run by non-root user) andgsd-subman-helper
(run by root user).RegisterServer
usingStart()
,then it returns address. When this method is called multiple
times and
RegisterServer
is still running, then the sameaddress is returned. It means, when user starts multiple
applications, then all of these applications should be able
to use the same address to keep backward compatibility.
The
RegisterServer
should be terminated only in the case,when the last application call Stop() and there is no running
process using this
RegisterServer
.RegisterServer
by some otheruser or application using Stop() method, when
RegisterServer
is still needed.
RegisterServer
only in the situation,when it is not needed by any application.
Stop()
method did not return anything explicitly,but the D-Bus method was designed to return boolean value. Thus,
None object was interpreted as "False" value. It was fixed and it
returns "True", when it was really stopped and it return "False",
when it was not possible to stop it, because some application
still uses
RegisterServer
.approach, but it has never been finished.