View | Details | Raw Unified | Return to bug 90114
Collapse All | Expand All

(-)src/usr.sbin/pw/pw_group.c (-1 / +8 lines)
Lines 93-100 Link Here
93
			a_name = NULL;
93
			a_name = NULL;
94
		}
94
		}
95
	}
95
	}
96
	grp = (a_name != NULL) ? GETGRNAM(a_name->val) : GETGRGID((gid_t) atoi(a_gid->val));
97
96
97
	if (a_name != NULL)
98
		grp = GETGRNAM(a_name->val);
99
	else {
100
		grp = GETGRGID((gid_t) atoi(a_gid->val));
101
		if (errno == EINVAL)
102
			errx(EX_DATAERR, "invalid group id `%s'", a_gid->val);
103
	}
104
	
98
	if (mode == M_UPDATE || mode == M_DELETE || mode == M_PRINT) {
105
	if (mode == M_UPDATE || mode == M_DELETE || mode == M_PRINT) {
99
		if (a_name == NULL && grp == NULL)	/* Try harder */
106
		if (a_name == NULL && grp == NULL)	/* Try harder */
100
			grp = GETGRGID(atoi(a_gid->val));
107
			grp = GETGRGID(atoi(a_gid->val));

Return to bug 90114