Lines Matching refs:gname
277 char gname[MAXNAMELEN];
282 (void) strlcpy(gname, name, MAXNAMELEN);
283 if (!smb_lgrp_normalize_name(gname))
290 grp.sg_name = smb_strlwr(gname);
296 wka = smb_wka_lookup_name(gname);
298 if ((pxgrp = getgrnam(gname)) == NULL) {
299 if (smb_lgrp_pgrp_add(gname) != 0) {
304 if ((pxgrp = getgrnam(gname)) == NULL) {
377 char gname[MAXNAMELEN], new_gname[MAXNAMELEN];
382 (void) strlcpy(gname, name, MAXNAMELEN);
383 if (!smb_lgrp_normalize_name(gname))
390 if (smb_strcasecmp(gname, new_gname, 0) == 0)
394 if (smb_wka_lookup_name(gname) != NULL)
419 rc = smb_lgrp_gtbl_update(db, gname, &grp, SMB_LGRP_GTBL_NAME);
436 char gname[MAXNAMELEN];
441 (void) strlcpy(gname, name, MAXNAMELEN);
442 if (!smb_lgrp_normalize_name(gname))
446 if (smb_wka_lookup_name(gname) != NULL)
450 if (!smb_lgrp_exists(gname))
457 rc = smb_lgrp_gtbl_delete(db, gname);
475 char gname[MAXNAMELEN];
480 (void) strlcpy(gname, name, MAXNAMELEN);
481 if (!smb_lgrp_normalize_name(gname))
493 rc = smb_lgrp_gtbl_update(db, gname, &grp, SMB_LGRP_GTBL_CMNT);
511 char gname[MAXNAMELEN];
516 (void) strlcpy(gname, name, MAXNAMELEN);
517 if (!smb_lgrp_normalize_name(gname))
528 SMB_LGRP_INFO_CMNT, gname);
552 char gname[MAXNAMELEN];
557 (void) strlcpy(gname, name, MAXNAMELEN);
558 if (!smb_lgrp_normalize_name(gname))
568 rc = smb_lgrp_gtbl_update_plist(db, gname, priv_lid, enable);
594 char gname[MAXNAMELEN];
599 (void) strlcpy(gname, name, MAXNAMELEN);
600 if (!smb_lgrp_normalize_name(gname))
611 SMB_LGRP_INFO_PRIV, gname);
634 char gname[MAXNAMELEN];
639 (void) strlcpy(gname, name, MAXNAMELEN);
640 if (!smb_lgrp_normalize_name(gname))
656 rc = smb_lgrp_gtbl_update_mlist(db, gname, &mid, SMB_LGRP_DB_ADDMEMBER);
674 char gname[MAXNAMELEN];
679 (void) strlcpy(gname, name, MAXNAMELEN);
680 if (!smb_lgrp_normalize_name(gname))
693 rc = smb_lgrp_gtbl_update_mlist(db, gname, &mid, SMB_LGRP_DB_DELMEMBER);
717 char gname[MAXNAMELEN];
722 (void) strlcpy(gname, name, MAXNAMELEN);
723 if (!smb_lgrp_normalize_name(gname))
731 SMB_LGRP_INFO_ALL, gname);
1467 smb_lgrp_gtbl_exists(sqlite3 *db, char *gname)
1479 gname);
1488 gname, NULL_MSGCHK(errmsg));
1598 smb_lgrp_gtbl_delete(sqlite3 *db, char *gname)
1607 sql = sqlite3_mprintf("DELETE FROM groups WHERE name = '%s'", gname);
1616 gname, NULL_MSGCHK(errmsg));
1633 smb_lgrp_gtbl_update(sqlite3 *db, char *gname, smb_group_t *grp, int col_id)
1642 /* UPDATE doesn't fail if gname doesn't exist */
1643 if (!smb_lgrp_gtbl_exists(db, gname))
1651 "WHERE name = '%s'", grp->sg_name, gname);
1656 "WHERE name = '%s'", grp->sg_cmnt, gname);
1671 gname, NULL_MSGCHK(errmsg));
1688 smb_lgrp_gtbl_update_mlist(sqlite3 *db, char *gname, smb_gsid_t *member,
1704 "WHERE name = '%s'", gname);
1714 gname, NULL_MSGCHK(errmsg));
1758 " WHERE name = '%s'", new_members.m_cnt, new_members.m_ids, gname);
1769 syslog(LOG_DEBUG, "failed to update %s (%s)", gname,
1787 smb_lgrp_gtbl_update_plist(sqlite3 *db, char *gname, uint8_t priv_id,
1802 "WHERE name = '%s'", gname);
1812 gname, NULL_MSGCHK(errmsg));
1842 gname);
1854 gname, NULL_MSGCHK(errmsg));
2583 char gname[MAXNAMELEN];
2588 (void) strlcpy(gname, name, MAXNAMELEN);
2589 if (!smb_lgrp_normalize_name(gname))
2596 rc = smb_lgrp_gtbl_exists(db, gname);