[26089] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r25383 - in trunk/debathena/debathena: . pharos-support

daemon@ATHENA.MIT.EDU (Geoffrey Thomas)
Wed Aug 17 19:24:55 2011

Date: Wed, 17 Aug 2011 19:23:21 -0400 (EDT)
From: Geoffrey Thomas <geofft@MIT.EDU>
To: Jonathan D Reed <jdreed@mit.edu>
cc: source-commits@mit.edu
In-Reply-To: <201108171757.p7HHvWB4010891@drugstore.mit.edu>
Message-ID: <alpine.DEB.2.00.1108171922310.479@tyger.mit.edu>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="-1156401407-201834281-1313623401=:479"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---1156401407-201834281-1313623401=:479
Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

ACK.

Note that under Ubuntu systems with AppArmor, your backend is going to run=
=20
unconfined with scrubbed environment. That seems like it should be fine=20
for now; it would probably be nice to eventually confine it the same way=20
running the lpd backend stays confined.

--=20
Geoffrey Thomas
geofft@mit.edu

On Wed, 17 Aug 2011, Jonathan D Reed wrote:

> Author: jdreed
> Date: 2011-08-17 13:57:31 -0400 (Wed, 17 Aug 2011)
> New Revision: 25383
>
> Added:
>   trunk/debathena/debathena/pharos-support/
>   trunk/debathena/debathena/pharos-support/debian/
>   trunk/debathena/debathena/pharos-support/debian/changelog
>   trunk/debathena/debathena/pharos-support/debian/compat
>   trunk/debathena/debathena/pharos-support/debian/control.in
>   trunk/debathena/debathena/pharos-support/debian/copyright
>   trunk/debathena/debathena/pharos-support/debian/install
>   trunk/debathena/debathena/pharos-support/debian/rules
>   trunk/debathena/debathena/pharos-support/pharos
>   trunk/debathena/debathena/pharos-support/pharos.8
> Log:
> In pharos-support:
>  * First version
>
>
> Added: trunk/debathena/debathena/pharos-support/debian/changelog
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- trunk/debathena/debathena/pharos-support/debian/changelog=09         =
               (rev 0)
> +++ trunk/debathena/debathena/pharos-support/debian/changelog=092011-08-1=
7 17:57:31 UTC (rev 25383)
> @@ -0,0 +1,7 @@
> +debathena-pharos-support (1.0) unstable; urgency=3Dlow
> +
> +  * First version
> +
> + -- Jonathan Reed <jdreed@mit.edu>  Wed, 17 Aug 2011 10:44:02 -0400
> +
> +
>
> Added: trunk/debathena/debathena/pharos-support/debian/compat
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- trunk/debathena/debathena/pharos-support/debian/compat=09            =
            (rev 0)
> +++ trunk/debathena/debathena/pharos-support/debian/compat=092011-08-17 1=
7:57:31 UTC (rev 25383)
> @@ -0,0 +1 @@
> +6
>
> Added: trunk/debathena/debathena/pharos-support/debian/control.in
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- trunk/debathena/debathena/pharos-support/debian/control.in=09        =
                (rev 0)
> +++ trunk/debathena/debathena/pharos-support/debian/control.in=092011-08-=
17 17:57:31 UTC (rev 25383)
> @@ -0,0 +1,15 @@
> +Source: debathena-pharos-support
> +Section: debathena/base
> +Priority: extra
> +Standards-Version: 3.9.1
> +Maintainer: Debathena Project <debathena@mit.edu>
> +Build-Depends: @cdbs@
> +
> +Package: debathena-pharos-support
> +Architecture: all
> +Depends: cups | cupsys,
> + hpijs,
> + ${misc:Depends}
> +Description: Pharos Support for Debathena
> + This package adds a new CUPS backend for Pharos queues to allow users
> + to specify an alternate username
>
> Added: trunk/debathena/debathena/pharos-support/debian/copyright
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- trunk/debathena/debathena/pharos-support/debian/copyright=09         =
               (rev 0)
> +++ trunk/debathena/debathena/pharos-support/debian/copyright=092011-08-1=
7 17:57:31 UTC (rev 25383)
> @@ -0,0 +1,21 @@
> +  Copyright =C2=A9 2011 Massachusetts Institute of Technology
> +
> +  Permission is hereby granted, free of charge, to any person
> +  obtaining a copy of this software and associated documentation files
> +  (the "Software"), to deal in the Software without restriction,
> +  including without limitation the rights to use, copy, modify, merge,
> +  publish, distribute, sublicense, and/or sell copies of the Software,
> +  and to permit persons to whom the Software is furnished to do so,
> +  subject to the following conditions:
> +
> +  The above copyright notice and this permission notice shall be
> +  included in all copies or substantial portions of the Software.
> +
> +  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> +  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> +  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> +  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
> +  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
> +  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
> +  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> +  SOFTWARE.
>
> Added: trunk/debathena/debathena/pharos-support/debian/install
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- trunk/debathena/debathena/pharos-support/debian/install=09           =
             (rev 0)
> +++ trunk/debathena/debathena/pharos-support/debian/install=092011-08-17 =
17:57:31 UTC (rev 25383)
> @@ -0,0 +1,2 @@
> +pharos usr/lib/cups/backend
> +pharos.8 usr/share/man/man8
>
> Added: trunk/debathena/debathena/pharos-support/debian/rules
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- trunk/debathena/debathena/pharos-support/debian/rules=09             =
           (rev 0)
> +++ trunk/debathena/debathena/pharos-support/debian/rules=092011-08-17 17=
:57:31 UTC (rev 25383)
> @@ -0,0 +1,12 @@
> +#!/usr/bin/make -f
> +
> +DEB_DH_FIXPERMS_ARGS =3D -X/usr/lib/cups/backend/pharos
> +
> +include /usr/share/cdbs/1/rules/debhelper.mk
> +
> +# CUPS decides whether to execute a backend as root or lp based on wheth=
er
> +# it's executable as lp or not.  We need to be executed as root in order
> +# to exec the lpd backend.  "Yay".
> +binary-install/debathena-pharos-support::
> +=09chmod 744 debian/debathena-pharos-support/usr/lib/cups/backend/pharos
> +
>
>
> Property changes on: trunk/debathena/debathena/pharos-support/debian/rule=
s
> ___________________________________________________________________
> Added: svn:executable
>   + *
>
> Added: trunk/debathena/debathena/pharos-support/pharos
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- trunk/debathena/debathena/pharos-support/pharos=09                   =
     (rev 0)
> +++ trunk/debathena/debathena/pharos-support/pharos=092011-08-17 17:57:31=
 UTC (rev 25383)
> @@ -0,0 +1,51 @@
> +#!/bin/sh
> +#
> +# Usage: $0 [job_id] [username] [title] [copies] [options] [filename]
> +#
> +# Exit codes: 0 - Success
> +#             1 - Failed
> +#             2 - Auth required
> +#             3 - Hold (try again later)
> +#             4 - Stop (don't retry)
> +#             5 - Cancel (cancel job and remove from queue
> +
> +discovery() {
> +    printf "%s %s \"%s\" \"%s\"\n" network pharos Unknown "MIT Pharos Pr=
inter"
> +}
> +
> +usage() {
> +    echo "$0 job-id username title copies options [filename]"
> +}
> +
> +case $# in
> +    0)
> +=09discovery && exit 0
> +=09;;
> +    5|6)
> +=09;;
> +    *)
> +=09usage && exit 1
> +=09;;
> +esac
> +
> +# I wonder if this works for Jerry Saltzer?
> +DEVICE_URI=3D"$(echo $DEVICE_URI | tr 'A-Z' 'a-z' | sed -e 's|^pharos://=
||')"
> +PHAROS_QUEUE=3D"$(echo $DEVICE_URI | awk -F/ '{print $1}')"
> +case "$PHAROS_QUEUE" in
> +    bw|color)
> +=09;;
> +    *)
> +=09# Unknown Printer
> +=09exit 4         #CUPS_BACKEND_STOP
> +=09;;
> +esac
> +USERNAME=3D"$(echo $DEVICE_URI | awk -F/ '{print $2}')"
> +# Should we test for [A-Za-z] instead?
> +if [ -z "$USERNAME" ]; then
> +    USERNAME=3D"$2"
> +fi
> +JOBID=3D"$1"
> +shift 2
> +export DEVICE_URI=3D"lpd://mitprint.mit.edu/${PHAROS_QUEUE}"
> +exec /usr/lib/cups/backend/lpd "$JOBID" "$USERNAME" "$@"
> +
>
>
> Property changes on: trunk/debathena/debathena/pharos-support/pharos
> ___________________________________________________________________
> Added: svn:executable
>   + *
>
> Added: trunk/debathena/debathena/pharos-support/pharos.8
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- trunk/debathena/debathena/pharos-support/pharos.8=09                 =
       (rev 0)
> +++ trunk/debathena/debathena/pharos-support/pharos.8=092011-08-17 17:57:=
31 UTC (rev 25383)
> @@ -0,0 +1,27 @@
> +.TH pharos 8 "August 2011" Debathena debathena-pharos-support
> +.SH NAME
> +pharos \- CUPS backend for Pharos queues
> +.SH SYNOPSIS
> +(This command should never be invoked manually)
> +.SH DESCRIPTION
> +The
> +.B pharos
> +backend takes URIs of the form
> +.I pharos://queue/user
> +where
> +.I queue
> +is one of the supported MIT Pharos queues ('bw' or 'color') and
> +.I user
> +is a Kerberos username.  This backend is only intended for use when
> +the local username does not match the user's Kerberos username.
> +
> +The backend does some argument parsing and invokes the built-in CUPS
> +.B lpd
> +backend.
> +.SH BUGS
> +Probably.
> +.SH AUTHOR
> +Debathena Project
> +.SH "SEE ALSO"
> +The CUPS documentation for the lpd backend, if it existed in man page
> +format and was accurate, but it doesn't and isn't.
>
>
---1156401407-201834281-1313623401=:479--

home help back first fref pref prev next nref lref last post