Halton,

Have you look inside,
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/svc/svcprop/svcprop.c

May be useful hints here.

-Ghee
Halton Huo wrote:
> Hi,
>
> I'm going to get auth_attr for give SMF service dynamically. I found
> most SMF service like nwam, snmp have property
> general/value_authorization.
>
> $svcprop nwam|grep general/value_authorization
> general/value_authorization astring solaris.smf.manage.nwam
> $svcprop snmp|grep general/value_authorization
> general/value_authorization astring
> solaris.smf.manage.discovery.printers.snmp
>
> ???Is it a right way to get auth_attr for a SMF service dynamically? If
> not, please ignore rest content.
>
> So I wrote code to get this prop dynamically, see the attachment. I
> found two problems:
>
> 1. scf_scope_get_service seems have problem. svc:/network/physical:nwam
> fail, while network/physical.
>
> 2. Only can get entity_stability for group general. svcprop can get all.
> $svcprop nwam|grep ^general
> general/action_authorization astring solaris.smf.manage.nwam
> general/enabled boolean false
> general/value_authorization astring solaris.smf.manage.nwam
> general/entity_stability astring Unstable
>
>
> Any wrong with my code?
>
> Thanks,
> Halton.
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> presto-discuss mailing list
> presto-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/presto-discuss


Reply via email to