seahorse r2145 - in trunk: . agent daemon



Author: sadam
Date: Mon Mar 10 13:54:56 2008
New Revision: 2145
URL: http://svn.gnome.org/viewvc/seahorse?rev=2145&view=rev

Log:
2008-03-10  Adam Schreiber  <sadam clemson edu>

    * configure.in:
    * agent/Makefile.am:
    * daemon/Makefile.am:
    * acinclude.m4: Remove code concerning mlock that is no longer used 
    now that secure memory is provided by gnome-keyring.  Fixes bug 
#520664


Modified:
   trunk/ChangeLog
   trunk/acinclude.m4
   trunk/agent/Makefile.am
   trunk/configure.in
   trunk/daemon/Makefile.am

Modified: trunk/acinclude.m4
==============================================================================
--- trunk/acinclude.m4	(original)
+++ trunk/acinclude.m4	Mon Mar 10 13:54:56 2008
@@ -38,58 +38,3 @@
     prefix=$prefix_save
     exec_prefix=$exec_prefix_save
 ])
-
-
-# Check if mlock needs root or not
-AC_DEFUN([SEAHORSE_CHECK_MLOCK],
-  [ AC_CHECK_FUNCS(mlock)
-    if test "$ac_cv_func_mlock" = "yes"; then
-        AC_MSG_CHECKING(whether mlock is callable as a normal user)
-          AC_CACHE_VAL(seahorse_cv_have_user_mlock,
-             AC_TRY_RUN([
-                #include <stdlib.h>
-                #include <unistd.h>
-                #include <errno.h>
-                #include <stdio.h>
-                #include <sys/mman.h>
-                #include <sys/types.h>
-                #include <fcntl.h>
-
-                int main () {
-                    long int pgsize = getpagesize ();
-                    char *pool = malloc (4096 + pgsize);
-                    if (!pool)
-                        return 2;
-                    pool += (pgsize - ((long int)pool % pgsize));
-                    if (mlock (pool, 4096) < 0) {
-                        if(errno == EPERM)
-                            return 1;
-                        return 2;
-                    }
-                    /* Configure is being run as root? */
-                    if (geteuid () == 0) {
-                        printf("assuming "); 
-                        return 1;
-                    }
-                    return 0;
-                }
-            ],
-            seahorse_cv_have_user_mlock="yes",
-            seahorse_cv_have_user_mlock="no",
-            seahorse_cv_have_user_mlock="assume-no"
-           )
-         )
-         AM_CONDITIONAL(HAVE_USER_MLOCK, test "$seahorse_cv_have_user_mlock" = "yes")
-         if test "$seahorse_cv_have_user_mlock" = "yes"; then
-             AC_DEFINE(HAVE_USER_MLOCK,1,
-                       [Defined if the mlock() call can be used by a non-superuser])
-             AC_MSG_RESULT(yes)
-         else
-            if test "$seahorse_cv_have_user_mlock" = "no"; then
-                AC_MSG_RESULT(no)
-            else
-                AC_MSG_RESULT(assuming no)
-            fi
-         fi
-    fi
-  ])

Modified: trunk/agent/Makefile.am
==============================================================================
--- trunk/agent/Makefile.am	(original)
+++ trunk/agent/Makefile.am	Mon Mar 10 13:54:56 2008
@@ -36,12 +36,3 @@
 
 CLEANFILES = \
 	*.gladep* *.bak
-
-if HAVE_USER_MLOCK
-# Don't make the agent setuid
-else
-# Make the agent setuid
-install-exec-hook:
-	chmod u+s $(DESTDIR)$(bindir)/seahorse-agent
-endif
-

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Mon Mar 10 13:54:56 2008
@@ -38,8 +38,6 @@
 
 AC_CHECK_FUNCS(setresuid setresgid)
 AC_CHECK_FUNCS(strsep)
-AC_CHECK_FUNCS(mlock)
-SEAHORSE_CHECK_MLOCK()
 
 AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
 

Modified: trunk/daemon/Makefile.am
==============================================================================
--- trunk/daemon/Makefile.am	(original)
+++ trunk/daemon/Makefile.am	Mon Mar 10 13:54:56 2008
@@ -72,11 +72,3 @@
 # Rule to make the service file with bindir expanded
 $(service_DATA): $(service_in_files) Makefile
 	@sed -e "s|\ bindir\@|$(bindir)|" $< > $@
-
-if HAVE_USER_MLOCK
-# Don't make the daemon setuid
-else
-# Make the daemon setuid
-install-exec-hook:
-	chmod u+s $(DESTDIR)$(bindir)/seahorse-daemon
-endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]