Fix some warnings.
This commit is contained in:
parent
2b5bb40706
commit
6d25002e5e
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2010/07/08 15:20:45 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2010/07/16 10:04:10 ajacoutot Exp $
|
||||
|
||||
COMMENT= framework for granting privileged operations to users
|
||||
|
||||
DISTNAME= polkit-0.97
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
PKGNAME= ${DISTNAME}p1
|
||||
|
||||
SHARED_LIBS += polkit-gobject-1 0.0 # .0.0
|
||||
SHARED_LIBS += polkit-backend-1 0.0 # .0.0
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-src_polkitagent_polkitagenthelper-bsdauth_c,v 1.2 2010/07/02 05:04:47 ajacoutot Exp $
|
||||
--- src/polkitagent/polkitagenthelper-bsdauth.c.orig Fri Jul 2 06:54:49 2010
|
||||
+++ src/polkitagent/polkitagenthelper-bsdauth.c Fri Jul 2 06:56:35 2010
|
||||
@@ -0,0 +1,203 @@
|
||||
$OpenBSD: patch-src_polkitagent_polkitagenthelper-bsdauth_c,v 1.3 2010/07/16 10:04:10 ajacoutot Exp $
|
||||
--- src/polkitagent/polkitagenthelper-bsdauth.c.orig Fri Jul 16 11:22:22 2010
|
||||
+++ src/polkitagent/polkitagenthelper-bsdauth.c Fri Jul 16 11:22:10 2010
|
||||
@@ -0,0 +1,204 @@
|
||||
+/*
|
||||
+ * Copyright (C) 2008 Red Hat, Inc.
|
||||
+ * Copyright (C) 2009-2010 Andrew Psaltis <ampsaltis@gmail.com>
|
||||
@ -45,16 +45,17 @@ $OpenBSD: patch-src_polkitagent_polkitagenthelper-bsdauth_c,v 1.2 2010/07/02 05:
|
||||
+
|
||||
+static int bsdauth_authenticate(const char *user_to_auth);
|
||||
+
|
||||
+int clearenv(void);
|
||||
+#ifndef HAVE_CLEARENV
|
||||
+extern char **environ;
|
||||
+
|
||||
+int
|
||||
+clearenv(void)
|
||||
+static int
|
||||
+clearenv (void)
|
||||
+{
|
||||
+ extern char **environ;
|
||||
+
|
||||
+ environ[0] = NULL;
|
||||
+ return 0;
|
||||
+ if (environ != NULL)
|
||||
+ environ[0] = NULL;
|
||||
+ return 0;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+int
|
||||
+main (int argc, char *argv[])
|
||||
@ -199,7 +200,7 @@ $OpenBSD: patch-src_polkitagent_polkitagenthelper-bsdauth_c,v 1.2 2010/07/02 05:
|
||||
+ if (strlen (passwd) > 0 && passwd[strlen (passwd) - 1] == '\n')
|
||||
+ passwd[strlen (passwd) - 1] = '\0';
|
||||
+
|
||||
+ if (auth_userokay(user_to_auth, NULL, "auth-polkit", passwd) == 0)
|
||||
+ if (auth_userokay((char *)user_to_auth, NULL, "auth-polkit", passwd) == 0)
|
||||
+ goto error;
|
||||
+ return 1;
|
||||
+error:
|
||||
|
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.21 2010/07/13 20:37:03 ajacoutot Exp $
|
||||
# $OpenBSD: Makefile,v 1.22 2010/07/16 10:04:35 ajacoutot Exp $
|
||||
|
||||
COMMENT= screen saver and locker for GNOME
|
||||
|
||||
GNOME_PROJECT= gnome-screensaver
|
||||
GNOME_VERSION= 2.30.0
|
||||
REVISION= 0
|
||||
REVISION= 1
|
||||
|
||||
# GPLv3
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: gs-auth-bsdauth.c,v 1.1 2009/06/04 00:45:39 ajacoutot Exp $
|
||||
/* $OpenBSD: gs-auth-bsdauth.c,v 1.2 2010/07/16 10:04:35 ajacoutot Exp $
|
||||
* gs-auth-bsdauth.c --- verifying typed passwords with bsd_auth(3)
|
||||
*
|
||||
* Copyright (c) 1993-1998 Jamie Zawinski <jwz@jwz.org>
|
||||
@ -84,7 +84,7 @@ gs_auth_verify_user (const char *username,
|
||||
}
|
||||
|
||||
/* authenticate */
|
||||
if (res = auth_userokay(username, NULL, "auth-gnome-screensaver", password)) {
|
||||
if (res = auth_userokay((char *)username, NULL, "auth-gnome-screensaver", password)) {
|
||||
return TRUE;
|
||||
} else {
|
||||
return FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user