By default, the popstore API subroutines do not allow manipulation of
the MANAGE usage flag for popstore accounts. Specifically, the
POPSTORE_user_data_set, POPSTORE_user_update, POPSTORE_command, and
POPSTORE_command_d subroutines will not, by default, allow alterations
to be made to that flag for any account. In order to enable the setting
or clearing of that flag, POPSTORE_manage must be called with a
non-zero value for the allow argument. To subsequently
disable the ability to set or clear the MANAGE flag, call
POPSTORE_manage with a zero value for allow. Note that
even after POPSTORE_manage has been called, a program cannot alter the
MANAGE flag, or any other aspect of a popstore account, unless it has
sufficient privileges to read and write profile files. Note that
POPSTORE_manage does not return a POPSTORE_ status code. Instead, it
returns a value indicating the state prior to calling POPSTORE_manage.
If a value of 0 is returned, then previously the MANAGE flag could not
be manipulated. If a value of 1 is returned, then previously the MANAGE
flag could be manipulated. Thus, a subroutine which needs to briefly
impose one state or another can make that imposition and then restore
the prior state:
/* Change the current state */
old_state = POPSTORE_manage (new_state);
...
/* Restore the old state */
(void) POPSTORE_manage (old_state);
Return Values