Integrate libsane and sane into Solaris [PSARC/2008/170 FastTrack timeout 03/11/2008]

Lei Chen Raymond.Chen at sun.com
Tue Mar 4 17:58:53 PST 2008


Brian Cameron wrote:
>
> Note that Sane and libsane was previously ARC'ed via LSARC
>
>   http://sac.eng.sun.com/arc/LSARC/2007/018/
>
> This case was derailed due to some concerns that Gary Winiger had.
Thank you for bringing up this question. I want to address Gary's 
concerns here:

1) Device allocation:

     It is to meet the Solaris object reuse, access and audit 
requirements. Referencing  "Controlling Access to Devices" in "System 
Administration Guide: Security Services"[1], I think sysadmin can easily 
put a scanner under the control of device allocation subsystem. If 
device allocation is desirable, the sysadmin or similar role can enable 
BSM by bsmconv(1M). Then the sysadmin can put the scanner's device 
special file in device_map and device_allocate(4), and provide a 
device-clean script. As Gary had pointed out in the LSARC case, a clean 
script is sufficient. In my opinion, the clean-script is up to the 
sysadmin. The ugen(7D) (sane backends access devices trough ugen 
interface) driver will not cache any data upon close, thus is not 
necessary to be cleaned. The clean-script may be just a script to print 
a message to remind user to take away his paper. If ARC think the 
project is responsible for clean-script, I will provide one.

     Device allocation can meet the requirements of object reuse, access 
and audit.

    2) HAL
     If I understand it correctly, I think Gary mentioned HAL in the 
LSARC because he wanted HAL to support Object Reuse and Audit.I checked 
the latest stable sane code[2] and don't find any place that SANE uses 
HAL utility. SANE merely relies on file owner/group/permissions of /dev 
special files for access control. I think current Solaris audit 
mechanism has done audit for it: A system call, like open(2), will be 
recorded. If BSM is enabled, the device allocation subsystem may record 
more events.
    SANE does not depend on HAL for device access control.

> Therefore, I am not sure that this case will be non-controversial
> or appropriate for FastTrack.  At any rate, effort should be made

For LSARC/2007/018, I don't think it's derailed. From the case's log, I 
read the following,

What Darren meant is that, "If this case is proposing running saned as
root then I'm derailing it", in fact, the Project team gave up
supporting scanner over the network at last. So Darren agree that
there's no need to derail the case.

I want to go another case because I will port libsane and sane, which 
are selected and categorized by Indiana. Xsane is out of the scope for 
this project.

Thanks,
Lei Chen

[1] http://docs.sun.com/app/docs/doc/816-4557
[2]http://www.sane-project.org/source.html

> to make sure that the issues that were raised in the previous ARC
> case are addressed.
>
> Brian
>
>
>> I am sponsoring this fast-track for Raymond Chen.
>> Requested release binding is minor, and the timer is set to
>> 03/11/2008.
>>
>> Regards,
>> T.Paul Lee
>>
>>
>> Template Version: @(#)sac_nextcase 1.64 07/13/07 SMI
>> This information is Copyright 2008 Sun Microsystems
>> 1. Introduction
>>     1.1. Project/Component Working Name:
>>      Integrate libsane and sane into Solaris
>>     1.2. Name of Document Author/Supplier:
>>      Author:  Raymond Chen
>>     1.3  Date of This Document:
>>     04 March, 2008
>> 4. Technical Description
>> Summary
>>     This project integrates libsane and sane into Solaris.
>>     This project requests a minor binding.
>>     
>> 4.1 Details
>>     
>>     SANE is an application programming interface (API) that provides
>>     standardized access to any raster image scanner hardware. The
>>     standardized interface  makes  it possible to write just one
>>     driver for each scanner device instead of one driver for each
>>     scanner and application.
>>     
>>     SANE is clearly separated into applications(frontends) and scanner
>>     drivers(backends). A SANE backend provides an interface with the
>>     hardware and describes a number of options which drive each scanner.
>>     sane, in this proposal, refers to applications that
>>     are delivered by SANE community, http://www.sane-project.org/.
>>
>>     "sane-backends" package of FOSS project SANE contains backends,
>>     documentation, networking support and the command line frontend
>>     "scanimage".
>>
>>     In this project, the following components will be ported and
>>     integrated into Solaris:
>>
>>         1)sane-backends
>>             sane-backends contain drivers for popular scanners on the
>>         market. This project proposes to only support local USB
>>         scanners.
>>         As an effort to enrich desktop applications for Indiana,
>>         SANE network feature is not considered essential and hence
>>         out of scope for this project. A future case may support
>>         this functionality.
>>
>>         2)libsane
>>             Standard SANE APIs are provided by libsane. Different
>>         frontends are developed on the base of such set of API.
>>
>>         3)sane documentation
>>             User manuals.
>>
>>         4)scanimage
>>             scanimage is a command-line interface to control image
>>         acquisition devices. It is one of the SANE frontends.
>>
>>         5)xscanimage
>>             xscanimage provides a graphical user interface to control
>>         an image acquisition device such as scanner. It allows
>>         previewing and scanning individual images.
>>     
>>     SANE depends on the scanner's device special file for access 
>> control.
>>     For USB interface scanners, by default only users on console or
>>     superuser have permission to access the devnode, which is controlled
>>     by logindevperm(4). It is also possible to restrict access to a
>>     scanner using Solaris device allocation subsystem. Sysadmin can 
>> enable
>>     BSM and put scanner device special file (exported by ugen(7D)) in
>>     device_map and device_allocate(4), so that the scanner is 
>> allocatable
>>     and then can be used by only one qualified user at a time.
>>
>>  
>> 4.2 Interface description
>>
>>     All interfaces in sane.h and saneopts.h are exported as Volatile.
>>
>>     Exported interfaces
>>     -------------------
>>     SUNWsane            Uncommitted    SANE frontends
>>     SUNWsane-backends        Uncommitted    SANE backends --
>>                             library and drivers
>>     /usr/include/sane/sane.h    Volatile    SANE API header file
>>     /usr/include/sane/saneopts.h    Volatile SANE options header file
>>     /usr/lib/libsane.so.1.0.19    Volatile    SANE library
>>     /usr/lib/sane/*        Volatile    SANE backends
>>     /etc/sane.d/dll.conf    Volatile    Contain backend names
>>     /etc/sane.d/*.conf        Volatile    Each backend has a .conf
>>
>>     /usr/bin/scanimage        Volatile    SANE CLI frontend
>>     /usr/bin/xscanimage        Volatile    SANE GUI frontend
>>     /usr/bin/sane-config    Volatile    Utility to get information
>>                             about installed libsane
>>     /usr/bin/sane-find-scanner    Volatile    Utility to find scanners
>>
>>     /usr/share/man/man1/scanimage.1    Volatile    manual
>>     /usr/share/man/man1/xscanimage.1    Volatile    manual
>>     /usr/share/man/man1/sane-find-scanner.1    Volatile    manual
>>     /usr/share/man/man1/sane-config.1    Volatile    manual
>>     /usr/share/man/man7/sane.7    Volatile    manual
>>     /usr/share/man/man5/sane-*.5    Volatile    Sane backends manual
>>
>>     --------------- SANE C API ----------------------------------------
>>     sane_init        Volatile    Initialize the backend
>>     sane_exit        Volatile    Terminate use of a backend
>>     sane_get_devices    Volatile    Query the list of devices
>>     sane_open        Volatile    Establish association with a
>>                         particular device
>>     sane_close        Volatile    Terminates the above association 
>>     sane_get_option_descriptor    Volatile    Access option descriptors
>>     sane_control_option    Volatile    Set/query the current value of
>>                         option number     sane_get_parameters    
>> Volatile    Obtain the current scan parameters
>>     sane_start        Volatile    Initiates acquisition of an image
>>     sane_read        Volatile    Read image data from the device
>>     sane_cancel        Volatile    Cancel the pending operation
>>     sane_set_io_mode    Volatile    Set the I/O mode
>>     sane_get_select_fd    Volatile    Obtain file-descriptor from handle
>>     sane_strstatus    Volatile    Translate SANE status code into
>>                         printable string
>>     Imported Interfaces
>>     --------------------
>>     libusb        Volatile    User-space USB device management
>>                         library
>>     libjpeg        Uncommitted    JPEG image compression and
>>                         decompression
>>     libtiff        Uncommitted     Reading and writing TIFF files
>>     GTK+        Volatile        GNOME Desktop Library      
>> GDK            Volatile        GNOME Desktop Library
>>
>>
>> 5. References
>>     [1] http://www.sane-project.org/
>>     [2] LSARC/2006/734 GNOME 2.16
>>     [3] LSARC 2003/085 libtiff, libjpeg and libpng.
>>     [4] PSARC 2003/721 libusb: user level usb library
>>     [5] LSARC 2007/018 Sane-backends and Xsane
>>
>> 6. Resources and Schedule
>>     6.4. Steering Committee requested information
>>        6.4.1. Consolidation C-team Name:
>>         sfw
>>     6.5. ARC review type: FastTrack
>>     6.6. ARC Exposure: open
>>
>> _______________________________________________
>> opensolaris-arc mailing list
>> opensolaris-arc at opensolaris.org
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.opensolaris.org/pipermail/opensolaris-arc/attachments/20080305/8bbfdcdd/attachment.html>


More information about the opensolaris-arc mailing list