Return-Path: Delivered-To: apmail-labs-commits-archive@minotaur.apache.org Received: (qmail 89207 invoked from network); 16 Feb 2009 05:28:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2009 05:28:16 -0000 Received: (qmail 95613 invoked by uid 500); 16 Feb 2009 05:28:15 -0000 Delivered-To: apmail-labs-commits-archive@labs.apache.org Received: (qmail 95533 invoked by uid 500); 16 Feb 2009 05:28:15 -0000 Mailing-List: contact commits-help@labs.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: labs@labs.apache.org Delivered-To: mailing list commits@labs.apache.org Received: (qmail 95523 invoked by uid 99); 16 Feb 2009 05:28:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2009 21:28:15 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Feb 2009 05:28:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8DE7023888F4; Mon, 16 Feb 2009 05:27:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@labs.apache.org From: pquerna@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090216052752.8DE7023888F4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 +#endif + +#if HAVE_PAM_PAM_MODULES_H +#include +#endif + +#if HAVE_SECURITY_PAM_APPL_H +#include +#endif + +#if HAVE_PAM_PAM_APPL_H +#include +#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