Home
last modified time | relevance | path

Searched refs:gid (Results 1 – 25 of 339) sorted by relevance

12345678910>>...14

/illumos-gate/usr/src/lib/libcmdutils/common/
H A Dgid.c41 static boolean_t isreservedgid(gid_t gid);
50 gid_t gid = start; in findnextgid() local
58 if (grp->gr_gid >= gid) { in findnextgid()
63 gid = grp->gr_gid + 1; in findnextgid()
73 while (isreservedgid(gid) && gid < stop) /* Skip reserved IDs */ in findnextgid()
74 gid++; in findnextgid()
75 *ret = gid; in findnextgid()
84 isreservedgid(gid_t gid) in isreservedgid() argument
86 return (gid == 60001 || gid == 60002 || gid == 65534); in isreservedgid()
96 gid_t gid; in findunusedgid() local
[all …]
/illumos-gate/usr/src/uts/common/sys/ib/clients/of/rdma/
H A Dib_addr.h79 union ib_gid *gid) in ib_addr_get_mgid() argument
81 (void) memcpy(gid, dev_addr->broadcast + 4, sizeof (*gid)); in ib_addr_get_mgid()
85 union ib_gid *gid) in ib_addr_get_sgid() argument
87 (void) memcpy(gid, dev_addr->src_dev_addr + 4, sizeof (*gid)); in ib_addr_get_sgid()
91 union ib_gid *gid) in ib_addr_set_sgid() argument
93 (void) memcpy(dev_addr->src_dev_addr + 4, gid, sizeof (*gid)); in ib_addr_set_sgid()
97 union ib_gid *gid) in ib_addr_get_dgid() argument
99 (void) memcpy(gid, dev_addr->dst_dev_addr + 4, sizeof (*gid)); in ib_addr_get_dgid()
103 union ib_gid *gid) in ib_addr_set_dgid() argument
105 (void) memcpy(dev_addr->dst_dev_addr + 4, gid, sizeof (*gid)); in ib_addr_set_dgid()
/illumos-gate/usr/src/lib/libc/port/sys/
H A Dchown.c36 fchownat(int fd, const char *name, uid_t uid, gid_t gid, int flags) in fchownat() argument
38 return (syscall(SYS_fchownat, fd, name, uid, gid, flags)); in fchownat()
43 chown(const char *name, uid_t uid, gid_t gid) in chown() argument
46 return (syscall(SYS_chown, name, uid, gid)); in chown()
48 return (fchownat(AT_FDCWD, name, uid, gid, 0)); in chown()
54 lchown(const char *name, uid_t uid, gid_t gid) in lchown() argument
57 return (syscall(SYS_lchown, name, uid, gid)); in lchown()
59 return (fchownat(AT_FDCWD, name, uid, gid, AT_SYMLINK_NOFOLLOW)); in lchown()
65 fchown(int filedes, uid_t uid, gid_t gid) in fchown() argument
68 return (syscall(SYS_fchown, filedes, uid, gid)); in fchown()
[all …]
/illumos-gate/usr/src/uts/common/syscall/
H A Dgid.c42 setgid(gid_t gid) in setgid() argument
52 if (!VALID_GID(gid, zone)) in setgid()
55 if (gid > MAXUID) { in setgid()
56 if (ksid_lookupbygid(zone, gid, &ksid) != 0) in setgid()
77 if ((gid == cr->cr_rgid || gid == cr->cr_sgid) && in setgid()
86 newcr->cr_gid = gid; in setgid()
98 if (cr->cr_gid != gid || in setgid()
99 cr->cr_rgid != gid || in setgid()
100 cr->cr_sgid != gid) in setgid()
104 newcr->cr_gid = gid; in setgid()
[all …]
H A Dchown.c58 fchownat(int fd, char *path, uid_t uid, gid_t gid, int flag) in fchownat() argument
65 gid != (gid_t)-1 && !VALID_GID(gid, zone)) { in fchownat()
69 vattr.va_gid = gid; in fchownat()
83 chown(char *path, uid_t uid, gid_t gid) in chown() argument
85 return (fchownat(AT_FDCWD, path, uid, gid, 0)); in chown()
89 lchown(char *path, uid_t uid, gid_t gid) in lchown() argument
91 return (fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)); in lchown()
95 fchown(int fd, uid_t uid, uid_t gid) in fchown() argument
97 return (fchownat(fd, NULL, uid, gid, 0)); in fchown()
/illumos-gate/usr/src/cmd/chgrp/
H A Dchgrp.c66 static gid_t gid; variable
185 if (sid_to_id(argv[0], B_FALSE, &gid)) { in main()
191 gid = gr->gr_gid; in main()
196 gid = (gid_t)strtoul(argv[0], NULL, 10); in main()
230 LCHOWN(argv[c], -1, gid); in main()
257 chgrpr(argv[c], gid); in main()
283 CHOWN(argv[c], -1, gid); in main()
290 CHOWN(argv[c], -1, gid); in main()
307 chgrpr(argv[c], gid); in main()
325 LCHOWN(argv[c], -1, gid); in main()
[all …]
/illumos-gate/usr/src/cmd/chown/
H A Dchown.c65 static gid_t gid = (gid_t)-1; variable
190 if (sid_to_id(grpp, B_FALSE, &gid)) { in main()
197 gid = grp->gr_gid; in main()
201 gid = (gid_t)strtoul(grpp, NULL, 10); in main()
265 LCHOWN(argv[c], uid, gid); in main()
294 uid, gid); in main()
312 CHOWN(argv[c], uid, gid); in main()
319 CHOWN(argv[c], uid, gid); in main()
329 chownr(argv[c], uid, gid); in main()
342 LCHOWN(argv[c], uid, gid); in main()
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libcmd/
H A Dchgrp.c127 int gid; /* gid */ member
171 key->uid = key->gid = NOID; in getids()
214 key->gid = n; in getids()
238 int gid; in b_chgrp() local
307 gid = st.st_gid; in b_chgrp()
369 m->to.uid = m->to.gid = NOID; in b_chgrp()
376 keys[1].gid = keys[2].uid = NOID; in b_chgrp()
383 if ((gid = key.gid) != NOID) in b_chgrp()
434 uid = gid = NOID; in b_chgrp()
436 keys[0].gid = keys[2].gid = ent->fts_statp->st_gid; in b_chgrp()
[all …]
H A Dcksum.c124 gid_t gid; /* caller gid */ member
244 …(st->st_gid != state->gid && ((st->st_mode & S_ISGID) || (st->st_mode & S_IRGRP) && !(st->st_mode … in pr()
266 int gid; in verify() local
294 gid = -1; in verify()
298 gid = struid(t); in verify()
338 if (gid < 0 || gid == st.st_gid) in verify()
339 gid = -1; in verify()
345 error(2, "%s: gid should be %s", file, fmtgid(gid)); in verify()
347 if (state->permissions && (uid >= 0 || gid >= 0)) in verify()
349 if (chown(file, uid, gid) < 0) in verify()
[all …]
/illumos-gate/usr/src/uts/common/io/ib/ibtl/
H A Dibtl_cm.c178 ibtl_cm_get_hca_port(ib_gid_t gid, ib_guid_t hca_guid, in ibtl_cm_get_hca_port() argument
193 gid.gid_prefix, gid.gid_guid, hca_guid); in ibtl_cm_get_hca_port()
195 if ((gid.gid_prefix == 0) || (gid.gid_guid == 0)) { in ibtl_cm_get_hca_port()
204 (gid.gid_guid == fast_gid.gid_guid) && in ibtl_cm_get_hca_port()
205 (gid.gid_prefix == fast_gid.gid_prefix)) { in ibtl_cm_get_hca_port()
245 if ((gid.gid_guid != sgid->gid_guid) || in ibtl_cm_get_hca_port()
246 (gid.gid_prefix != sgid->gid_prefix)) in ibtl_cm_get_hca_port()
253 fast_gid = gid; in ibtl_cm_get_hca_port()
294 ib_gid_t gid; in ibtl_cm_get_cnt() local
354 gid = pinfop->p_sgid_tbl[j]; in ibtl_cm_get_cnt()
[all …]
/illumos-gate/usr/src/cmd/sendmail/libsm/
H A Dt-sem.c131 drop_priv(uid, gid) in drop_priv() argument
133 gid_t gid;
137 r = setgid(gid);
158 semtest(owner, uid, gid) in semtest() argument
161 gid_t gid;
168 r = drop_priv(uid, gid);
186 r = sm_semsetowner(semid, uid, gid, 0660);
192 r = drop_priv(uid, gid);
327 gid_t gid; local
330 gid = 0;
[all …]
/illumos-gate/usr/src/cmd/oamuser/lib/
H A Dvgid.c48 valid_gid( gid, gptr ) in valid_gid() argument
49 gid_t gid; in valid_gid()
54 if( gid < 0 ) return( INVALID );
56 if( gid > MAXUID ) return( TOOBIG );
58 if( t_gptr = getgrgid( gid ) ) {
63 if( gid <= DEFGID ) {
64 if( gptr ) *gptr = getgrgid( gid );
/illumos-gate/usr/src/cmd/fs.d/smbclnt/chacl/
H A Dchacl.c80 gid_t gid = (gid_t)-1; in main() local
104 gid = (gid_t)tl; in main()
149 if (gid != (gid_t)-1) in main()
155 chacl(argv[optind], selector, uid, gid, acl); in main()
163 chacl(char *file, uint32_t selector, uid_t uid, gid_t gid, acl_t *acl) in chacl() argument
181 if (uid == (uid_t)-1 || gid == (gid_t)-1) { in chacl()
193 if (gid == (gid_t)-1) in chacl()
194 gid = st.st_gid; in chacl()
200 error = smbfs_acl_zfs2sd(acl, uid, gid, selector, &sd); in chacl()
216 if (gid == (gid_t)-1) in chacl()
[all …]
/illumos-gate/usr/src/lib/pam_modules/dhkeys/
H A Dkey_call_uid.c50 authsys_create_uid(uid_t uid, gid_t gid) in authsys_create_uid() argument
62 res = authsys_create(host, uid, gid, 0, (gid_t *)NULL); in authsys_create_uid()
76 xdrproc_t xdr_rslt, char *rslt, uid_t uid, gid_t gid) in my_key_call() argument
129 clnt->cl_auth = authsys_create_uid(uid, gid); in my_key_call()
141 key_setnet_uid(struct key_netstarg *arg, uid_t uid, gid_t gid) in key_setnet_uid() argument
146 (char *)arg, xdr_keystatus, (char *)&status, uid, gid)) { in key_setnet_uid()
159 uid_t uid, gid_t gid) in key_setnet_g_uid() argument
213 return (key_setnet_uid(&tmp, uid, gid)); in key_setnet_g_uid()
217 (char *)&arg, xdr_keystatus, (char *)&status, uid, gid)) { in key_setnet_g_uid()
234 key_secretkey_is_set_uid(uid_t uid, gid_t gid) in key_secretkey_is_set_uid() argument
[all …]
/illumos-gate/usr/src/contrib/ast/src/lib/libast/string/
H A Dfmtgid.c60 fmtgid(int gid) in fmtgid() argument
76 else if (ip = (Id_t*)dtmatch(dict, &gid)) in fmtgid()
78 if (gr = getgrgid(gid)) in fmtgid()
86 else if (gid == 0) in fmtgid()
90 name = fmtbuf(z = sizeof(gid) * 3 + 1); in fmtgid()
91 sfsprintf(name, z, "%I*d", sizeof(gid), gid); in fmtgid()
95 ip->id = gid; in fmtgid()
/illumos-gate/usr/src/cmd/ypcmd/mknetid/
H A Dmknetid.c168 int uid, gid; local
190 gid = Atoi(name);
191 put_d(gid);
194 gid = Atoi(name);
196 put_d(gid);
215 int gid; local
226 gid = Atoi(name);
229 storegid(gid, name);
247 int uid, gid; local
268 gid = Atoi(name);
[all …]
/illumos-gate/usr/src/lib/udapl/udapl_tavor/common/
H A Ddapl_name_service.c122 ib_gid_t gid; in dapli_ns_create_gid_map() local
137 &gid.gid_prefix, &gid.gid_guid); in dapli_ns_create_gid_map()
166 gmt.gid.gid_prefix = gid.gid_prefix; in dapli_ns_create_gid_map()
167 gmt.gid.gid_guid = gid.gid_guid; in dapli_ns_create_gid_map()
171 &gid.gid_prefix, &gid.gid_guid); in dapli_ns_create_gid_map()
237 OUT ib_gid_t *gid) in dapls_ns_lookup_address() argument
248 gid->gid_guid = gmt->gid.gid_guid; in dapls_ns_lookup_address()
249 gid->gid_prefix = gmt->gid.gid_prefix; in dapls_ns_lookup_address()
308 OUT ib_gid_t *gid);
314 OUT ib_gid_t *gid);
[all …]
/illumos-gate/usr/src/ucbcmd/chown/
H A Dchown.c68 gid_t gid; in main() local
99 gid = -1; in main()
106 gid = grp -> gr_gid; in main()
110 gid = (gid_t)strtol(group, NULL, 10); in main()
143 status += chownr(argv[c], uid, gid); in main()
146 if (lchown(argv[c], uid, gid)) { in main()
166 chownr(char *dir, uid_t uid, gid_t gid) in chownr() argument
179 if (chown(dir, uid, gid) < 0 && Perror(dir)) in chownr()
200 ecode = chownr(dp->d_name, uid, gid); in chownr()
205 if (lchown(dp->d_name, uid, gid) < 0 && in chownr()
/illumos-gate/usr/src/cmd/id/
H A Did.c71 gid_t gid, egid, prgid; in main() local
150 prgid = gid = egid = pwp->pw_gid; in main()
153 gid = getgid(); in main()
161 gid = egid; in main()
166 pgid(gid); in main()
168 pgid(gid); in main()
178 if ((gid = groupids[j]) == egid) in main()
181 pgid(gid); in main()
188 prid(GID, gid); in main()
191 if (gid != egid) in main()
[all …]
/illumos-gate/usr/src/lib/nsswitch/nis/common/
H A Dgetgrent.c59 if (argp->key.gid > MAXUID)
61 (void) snprintf(gidstr, 12, "%d", argp->key.gid);
72 ulong_t gid; in validate_group_ids() local
91 gid = strtoul(gidp, (char **)&linep, 10); /* grab gid */ in validate_group_ids()
96 if (gid <= MAXUID) in validate_group_ids()
190 add_gid(gid_t gid_array[], int numgids, gid_t gid) in add_gid() argument
195 if (gid_array[i] == gid) { in add_gid()
199 gid_array[numgids++] = gid; in add_gid()
214 gid_t gid; in parse_netid() local
238 gid = (gid_t)value; in parse_netid()
[all …]
/illumos-gate/usr/src/lib/nsswitch/ad/common/
H A Dgetgrent.c31 const char *name, const char *domain, gid_t gid) in update_buffer() argument
39 buflen = snprintf(NULL, 0, "%s@%s::%u:", name, domain, gid) + 1; in update_buffer()
53 (void) snprintf(buffer, buflen, "%s@%s::%u:", name, domain, gid); in update_buffer()
72 gid_t gid; in getbynam() local
93 0, &is_user, &is_wuser, &gid, NULL, NULL, NULL); in getbynam()
100 if (update_buffer(be, argp, name, dname, gid) < 0) in getbynam()
127 if (argp->key.gid <= MAXUID) in getbygid()
131 if (idmap_get_u2w_mapping(&argp->key.gid, NULL, 0, in getbygid()
146 if (update_buffer(be, argp, winname, windomain, argp->key.gid) < 0) in getbygid()
/illumos-gate/usr/src/cmd/oamuser/group/
H A Dgroupadd.c65 gid_t gid; /* group id */ in main() local
110 gid = (gid_t)strtol(gidstr, &ptr, 10); in main()
117 switch (valid_gid(gid, NULL)) { in main()
119 errmsg(M_RESERVED, gid); in main()
134 errmsg(M_TOOBIG, gid); in main()
141 if (findnextgid(DEFRID+1, MAXUID, &gid) != 0) { in main()
148 if ((rc = add_group(grpname, gid)) != EX_SUCCESS) in main()
H A Dgroupmod.c61 gid_t gid; /* group id */ in main() local
100 gid = (gid_t)strtol(gidstr, &ptr, 10); in main()
107 switch (valid_gid(gid, NULL)) { in main()
109 errmsg(M_RESERVED, gid); in main()
125 errmsg(M_TOOBIG, gid); in main()
131 } else gid = -1; in main()
146 if ((valret = mod_group(grpname, gid, newname)) != EX_SUCCESS) { in main()
/illumos-gate/usr/src/lib/libidmap/common/
H A Didmap_cache.h56 gid_t *gid);
68 gid_t gid);
74 idmap_cache_lookup_winnamebygid(char **winname, char **windomain, gid_t gid);
82 gid_t *gid);
89 idmap_cache_add_sid2gid(const char *sid_prefix, idmap_rid_t rid, gid_t gid,
102 gid_t gid, int direction);
/illumos-gate/usr/src/uts/common/idmap/
H A Didmap_kapi.c70 gid_t *gid; member
504 gid_t *gid) in kidmap_getgidbysid() argument
514 if (sid_prefix == NULL || gid == NULL) in kidmap_getgidbysid()
519 if (kidmap_cache_lookup_gidbysid(&zs->cache, sid_prefix, rid, gid) in kidmap_getgidbysid()
540 *gid = GID_NOBODY; in kidmap_getgidbysid()
544 *gid = results.ids.ids_val[0].id.idmap_id_u.gid; in kidmap_getgidbysid()
549 new_sid_prefix, rid, *gid, in kidmap_getgidbysid()
554 *gid = GID_NOBODY; in kidmap_getgidbysid()
560 *gid = GID_NOBODY; in kidmap_getgidbysid()
628 *pid = results.ids.ids_val[0].id.idmap_id_u.gid; in kidmap_getpidbysid()
[all …]

12345678910>>...14