⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getnetgrent.3

📁 早期freebsd实现
💻 3
字号:
.\" Copyright (c) 1992, 1993.\"	The Regents of the University of California.  All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\"    notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\"    notice, this list of conditions and the following disclaimer in the.\"    documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\"    must display the following acknowledgement:.\"	This product includes software developed by the University of.\"	California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\"    may be used to endorse or promote products derived from this software.\"    without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\"     @(#)getnetgrent.3	8.1 (Berkeley) 6/4/93.\".Dd June 4, 1993.Dt GETNETGRENT 3.Os.Sh NAME.Nm getnetgrent ,.Nm innetgr ,.Nm setnetgrent ,.Nm endnetgrent.Nd netgroup database operations.Sh SYNOPSIS.Ft int.Fn getnetgrent "char **host, char **user, char **domain".Ft int.Fn innetgr "const char *netgroup, const char *host, const char *user, const char *domain".Ft void.Fn setnetgrent "const char *netgroup".Ft void.Fn endnetgrent void.Sh DESCRIPTIONThese functions operate on the netgroup database file.Pa /etc/netgroupwhich is describedin.Xr netgroup 5 .The database defines a set of netgroups, each made up of one or more triples:.Bd -literal -offset indent(host, user, domain).Edthat defines a combination of host, user and domain.Any of the three fields may be specified as ``wildcards'' that match anystring..PpThe function.Fn getnetgrentsets the three pointer arguments to the strings of the next member of thecurrent netgroup.If any of the string pointers are.Sy (char *)0that field is considered a wildcard..PpThe functions.Fn setnetgrentand.Fn endnetgrentset the current netgroup and terminate the current netgroup respectively.If.Fn setnetgrentis called with a different netgroup than the previous call, an implicit.Fn endnetgrentis implied..Fn Setnetgrentalso sets the offset to the first member of the netgroup..PpThe function.Fn innetgrsearches for a match of all fields within the specified group.If any of the.Sy host ,.Sy user ,or.Sy domainarguments are.Sy (char *)0those fields will match any string value in the netgroup member..Sh RETURN VALUESThe function.Fn getnetgrentreturns 0 for ``no more netgroup members'' and 1 otherwise.The function.Fn innetgrreturns 1 for a successful match and 0 otherwise.The functions.Fn setnetgrentand.Fn endnetgrenthave no return value..Sh FILES.Bl -tag -width /etc/netgroup -compact.It Pa /etc/netgroupnetgroup database file.El.Sh SEE ALSO.Fn netgroup 5.Sh COMPATIBILITYThe netgroup members have three string fields to maintain compatibilitywith other vendor implementations, however it is not obvious what use the.Sy domainstring has within BSD..Sh BUGSThe function.Fn getnetgrentreturns pointers to dynamically allocated data areas that are free'd whenthe function.Fn endnetgrentis called.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -