Deleted Added
full compact
pam_nologin.c (90229) pam_nologin.c (91714)
1/*-
2 * Copyright 2001 Mark R V Murray
3 * All rights reserved.
4 * Copyright (c) 2001 Networks Associates Technologies, Inc.
5 * All rights reserved.
6 *
7 * Portions of this software were developed for the FreeBSD Project by
8 * ThinkSec AS and NAI Labs, the Security Research Division of Network

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

30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright 2001 Mark R V Murray
3 * All rights reserved.
4 * Copyright (c) 2001 Networks Associates Technologies, Inc.
5 * All rights reserved.
6 *
7 * Portions of this software were developed for the FreeBSD Project by
8 * ThinkSec AS and NAI Labs, the Security Research Division of Network

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

30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/lib/libpam/modules/pam_nologin/pam_nologin.c 90229 2002-02-05 06:08:26Z des $");
38__FBSDID("$FreeBSD: head/lib/libpam/modules/pam_nologin/pam_nologin.c 91714 2002-03-05 21:56:25Z des $");
39
40#include <sys/types.h>
41#include <sys/stat.h>
42#include <fcntl.h>
43#include <login_cap.h>
44#include <pwd.h>
45#include <stdio.h>
46#include <stdlib.h>

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

103
104 if (fstat(fd, &st) < 0)
105 PAM_RETURN(retval);
106
107 mtmp = malloc(st.st_size + 1);
108 if (mtmp != NULL) {
109 read(fd, mtmp, st.st_size);
110 mtmp[st.st_size] = '\0';
39
40#include <sys/types.h>
41#include <sys/stat.h>
42#include <fcntl.h>
43#include <login_cap.h>
44#include <pwd.h>
45#include <stdio.h>
46#include <stdlib.h>

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

103
104 if (fstat(fd, &st) < 0)
105 PAM_RETURN(retval);
106
107 mtmp = malloc(st.st_size + 1);
108 if (mtmp != NULL) {
109 read(fd, mtmp, st.st_size);
110 mtmp[st.st_size] = '\0';
111 pam_prompt(pamh, PAM_ERROR_MSG, mtmp, NULL);
111 pam_error(pamh, "%s", mtmp, NULL);
112 free(mtmp);
113 }
114
115 if (retval != PAM_SUCCESS)
116 PAM_VERBOSE_ERROR("Administrator refusing you: %s", NOLOGIN);
117
118 PAM_RETURN(retval);
119}

--- 62 unchanged lines hidden ---
112 free(mtmp);
113 }
114
115 if (retval != PAM_SUCCESS)
116 PAM_VERBOSE_ERROR("Administrator refusing you: %s", NOLOGIN);
117
118 PAM_RETURN(retval);
119}

--- 62 unchanged lines hidden ---