vitalnix user management suite 3.2.0


Name

vxdb_sgmapadd - add a secondary group mapping

Synopsis

#include <vitalnix/libvxdb/libvxdb.h>
#include <vitalnix/libvxdb/xafunc.h>

int vxdb_sgmapadd(struct vxdb_state *handle, const char *user, const char *group);

Link with -lvxdb.

Description

The vxdb_sgmapadd() function is used to add a new secondary group mapping, i.e. it will add the group to the user's list of secondary (or "supplementary") groups.

Return value

On success, positive non-zero is returned. On error, zero or a negative value is returned, indicating the error.

-ENOENT The user or the group does not exist.
-EEXIST The mapping already exists.
-EPERM Not enough privileges to complete this operation.

See also

vxdb_sgmapget(3), vxdb_sgmapdel(3)