ocs share api stable5

OCS Share API backport to stable5.

cc @karlitschek @DeepDiver1975 @PVince81