Nope, we should be using getauthattr - this is to get the existing list of
profiles, etc that a user has - which is necessary to ensure we don't remove a
profile since the usermod command we use to update the user's information,
doesn't support addition or removal of roles or profiles, only setting the exact
list.[1]

Darren.

[1] - Darren Moffat mentioned this deficiency before, but I don't believe it's
      ever been resolved.

On 29/04/2009 19:48, Brian Cameron wrote:
> 
> Jim:
> 
> Oh, I should have said that the function you probably want to use
> is setauthattr(3SECDB).
> 
> Brian
> 
>> There is a C-interface called getuserattr(3SECDB) which allows you
>> to easily access user_attr values. Wouldn't it be better to use this
>> rather than try to parse the file directly?
>>
>> Perhaps it would be good to write a small C-program to get the data
>> you need and use it to get the data you need?
>>
>> Brian
>>
>>
>>> The backend cann't get the correct user's profiles, cause 'profiles
>>> $name' command has change it's format of output. This patch get an
>>> user's profiles by directly parsing /etc/user_attr file instead of using
>>> profiles command.
>>>
>>> thanks
>>>
>>> Jim
>>
> 

Reply via email to