Deleted Added
full compact
openpam_straddch.3 (236109) openpam_straddch.3 (247810)
1.\"-
2.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
3.\" Copyright (c) 2004-2011 Dag-Erling Sm��rgrav
4.\" All rights reserved.
5.\"
6.\" This software was developed for the FreeBSD Project by ThinkSec AS and
7.\" Network Associates Laboratories, the Security Research Division of
8.\" Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035

--- 20 unchanged lines hidden (view full) ---

29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\" $Id$
36.\"
1.\"-
2.\" Copyright (c) 2001-2003 Networks Associates Technology, Inc.
3.\" Copyright (c) 2004-2011 Dag-Erling Sm��rgrav
4.\" All rights reserved.
5.\"
6.\" This software was developed for the FreeBSD Project by ThinkSec AS and
7.\" Network Associates Laboratories, the Security Research Division of
8.\" Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035

--- 20 unchanged lines hidden (view full) ---

29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\" $Id$
36.\"
37.Dd May 26, 2012
37.Dd March 3, 2013
38.Dt OPENPAM_STRADDCH 3
39.Os
40.Sh NAME
41.Nm openpam_straddch
42.Nd add a character to a string, expanding the buffer if needed
43.Sh LIBRARY
44.Lb libpam
45.Sh SYNOPSIS

--- 22 unchanged lines hidden (view full) ---

68.Pp
69The
70.Fa size
71and
72.Fa len
73argument point to variables used to hold the size
74of the buffer and the length of the string it contains, respectively.
75.Pp
38.Dt OPENPAM_STRADDCH 3
39.Os
40.Sh NAME
41.Nm openpam_straddch
42.Nd add a character to a string, expanding the buffer if needed
43.Sh LIBRARY
44.Lb libpam
45.Sh SYNOPSIS

--- 22 unchanged lines hidden (view full) ---

68.Pp
69The
70.Fa size
71and
72.Fa len
73argument point to variables used to hold the size
74of the buffer and the length of the string it contains, respectively.
75.Pp
76The final argument,
77.Fa ch ,
78is the character that should be appended to
79the string. If
80.Fa ch
81is 0, nothing is appended, but a new buffer is
82still allocated if
83.Fa str
84is NULL. This can be used to
85.Do
86bootstrap
87.Dc
88the
89string.
90.Pp
76If a new buffer is allocated or an existing buffer is reallocated to
77make room for the additional character,
78.Fa str
79and
80.Fa size
81are updated
82accordingly.
83.Pp
84The
85.Fn openpam_straddch
86function ensures that the buffer is always
87NUL-terminated.
88.Pp
89If the
90.Fn openpam_straddch
91function is successful, it increments the
92integer variable pointed to by
93.Fa len
91If a new buffer is allocated or an existing buffer is reallocated to
92make room for the additional character,
93.Fa str
94and
95.Fa size
96are updated
97accordingly.
98.Pp
99The
100.Fn openpam_straddch
101function ensures that the buffer is always
102NUL-terminated.
103.Pp
104If the
105.Fn openpam_straddch
106function is successful, it increments the
107integer variable pointed to by
108.Fa len
94and returns 0.
109(unless
110.Fa ch
111was 0) and returns 0.
95Otherwise, it leaves the variables pointed to by
96.Fa str ,
97.Fa size
98and
99.Fa len
100unmodified, sets
101.Va errno
102to

--- 20 unchanged lines hidden ---
112Otherwise, it leaves the variables pointed to by
113.Fa str ,
114.Fa size
115and
116.Fa len
117unmodified, sets
118.Va errno
119to

--- 20 unchanged lines hidden ---