labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pque...@apache.org
Subject svn commit: r744805 - in /labs/orthrus/trunk: ./ SConstruct src/ui/pam/ src/ui/pam/pam_orthrus.c
Date Mon, 16 Feb 2009 05:27:52 GMT
Author: pquerna
Date: Mon Feb 16 05:27:52 2009
New Revision: 744805

URL: http://svn.apache.org/viewvc?rev=744805&view=rev
Log:
Stub out building a PAM module.

Added:
    labs/orthrus/trunk/src/ui/pam/
    labs/orthrus/trunk/src/ui/pam/pam_orthrus.c   (with props)
Modified:
    labs/orthrus/trunk/   (props changed)
    labs/orthrus/trunk/SConstruct

Propchange: labs/orthrus/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon Feb 16 05:27:52 2009
@@ -1,3 +1,6 @@
+config.log
+.sconf*
+pam_orthrus.so
 orthrustest
 ortcalc*
 *orthrus-0.*

Modified: labs/orthrus/trunk/SConstruct
URL: http://svn.apache.org/viewvc/labs/orthrus/trunk/SConstruct?rev=744805&r1=744804&r2=744805&view=diff
==============================================================================
--- labs/orthrus/trunk/SConstruct (original)
+++ labs/orthrus/trunk/SConstruct Mon Feb 16 05:27:52 2009
@@ -53,6 +53,13 @@
 
 headers = env.Glob('include/*.h')
 
+conf = env.Configure(config_h='include/private/config.h')
+conf.CheckCHeader("security/pam_modules.h")
+conf.CheckCHeader("pam/pam_modules.h")
+conf.CheckCHeader("security/pam_appl.h")
+conf.CheckCHeader("pam/pam_appl.h")
+conf.Finish()
+
 appenv = env.Clone()
 appenv.AppendUnique(LIBS=lib)
 if appenv['PLATFORM'] != 'darwin':
@@ -63,21 +70,36 @@
   else:
     appenv.Append(RPATH = [pjoin(env['PREFIX'], 'lib')])
 
+
 tests = appenv.Program(target='orthrustest', source = ['src/tests/orthrustest.c'])
 ortcalc = appenv.Program(target='ortcalc', source = ['src/ui/ortcalc/ortcalc.c'])
 
+pamorthrus = appenv.LoadableModule(target = "pam_orthrus.so",
+                                   source = ['src/ui/pam/pam_orthrus.c'], SHLIBPREFIX='')
+
+
 install = []
-foo = env.Install(pjoin(env['DESTDIR'], env['PREFIX'], 'bin'), ortcalc)
-if env['PLATFORM'] == 'darwin':
-  env.AddPostAction(foo, 
-    "install_name_tool -change 'liborthrus-%d.dylib' '%s/liborthrus-%d.dylib' %s" % (orthrus_major,

-      pjoin(env['PREFIX'], 'lib'), orthrus_major, foo[0].get_abspath()))
+def edit_path(env, obj):
+  if env['PLATFORM'] == 'darwin':
+    env.AddPostAction(obj, 
+      "install_name_tool -change 'liborthrus-%d.dylib' '%s/liborthrus-%d.dylib' %s" % (orthrus_major,

+        pjoin(env['PREFIX'], 'lib'), orthrus_major, obj[0].get_abspath()))
+  return obj
 
-install.extend(foo)
+install.extend(edit_path(env, env.Install(pjoin(env['DESTDIR'], env['PREFIX'], 'bin'), ortcalc)))
 install.extend(env.Install(pjoin(env['DESTDIR'], env['PREFIX'], 'lib'), lib))
+
+#
+# TODO: Figure out a better test, how do you know if it uses 'pam' or 'security' 
+# for the directory name.
+if env['PLATFORM'] == 'darwin':
+  install.extend(edit_path(env, env.Install(pjoin(env['DESTDIR'], env['PREFIX'], 'lib', 'pam'),
pamorthrus)))
+else:
+  install.extend(env.Install(pjoin(env['DESTDIR'], env['PREFIX'], 'lib', 'security'), pamorthrus))
+
 install.extend(env.Install(pjoin(env['DESTDIR'], env['PREFIX'], 'include', "orthrus-%d" %
(orthrus_major)), headers))
 
-targets = [lib, ortcalc, tests]
+targets = [lib, pamorthrus, ortcalc, tests]
 env.Alias('install', install)
 env.Default(targets)
 

Added: labs/orthrus/trunk/src/ui/pam/pam_orthrus.c
URL: http://svn.apache.org/viewvc/labs/orthrus/trunk/src/ui/pam/pam_orthrus.c?rev=744805&view=auto
==============================================================================
--- labs/orthrus/trunk/src/ui/pam/pam_orthrus.c (added)
+++ labs/orthrus/trunk/src/ui/pam/pam_orthrus.c Mon Feb 16 05:27:52 2009
@@ -0,0 +1,34 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "orthrus.h"
+#include "private/config.h"
+
+#if HAVE_SECURITY_PAM_MODULES_H
+#include <security/pam_modules.h>
+#endif
+
+#if HAVE_PAM_PAM_MODULES_H
+#include <pam/pam_modules.h>
+#endif
+
+#if HAVE_SECURITY_PAM_APPL_H
+#include <security/pam_appl.h>
+#endif
+
+#if HAVE_PAM_PAM_APPL_H
+#include <pam/pam_appl.h>
+#endif

Propchange: labs/orthrus/trunk/src/ui/pam/pam_orthrus.c
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: labs/orthrus/trunk/src/ui/pam/pam_orthrus.c
------------------------------------------------------------------------------
    svn:keywords = Date Revision Author HeadURL Id

Propchange: labs/orthrus/trunk/src/ui/pam/pam_orthrus.c
------------------------------------------------------------------------------
    svn:mime-type = text/plain



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message