sane-project-website/old-archive/1996-12/0015.html

111 wiersze
5.4 KiB
HTML

<!-- received="Wed Dec 18 14:50:52 1996 MST" -->
<!-- sent="Wed, 18 Dec 1996 20:45:42 +0100 (MET)" -->
<!-- name="becka@sunserver1.rz.uni-duesseldorf.de" -->
<!-- email="becka@sunserver1.rz.uni-duesseldorf.de" -->
<!-- subject="Re: mail lossage?" -->
<!-- id="m0vaRvy-000BYLC@charon.beck-sw.de" -->
<!-- inreplyto="199612170407.VAA22685@panda.mosberger" -->
<title>sane-devel: Re: mail lossage?</title>
<h1>Re: mail lossage?</h1>
<a href="mailto:becka@sunserver1.rz.uni-duesseldorf.de"><i>becka@sunserver1.rz.uni-duesseldorf.de</i></a><br>
<i>Wed, 18 Dec 1996 20:45:42 +0100 (MET)</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#15">[ date ]</a><a href="index.html#15">[ thread ]</a><a href="subject.html#15">[ subject ]</a><a href="author.html#15">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0016.html">becka@sunserver1.rz.uni-duesseldorf.de: "Re: sane-0.3: it's almost for real now!"</a>
<li> <b>Previous message:</b> <a href="0014.html">Michael K. Johnson: "Re: sane-0.3: it's almost for real now!"</a>
<li> <b>In reply to:</b> <a href="0012.html">David Mosberger-Tang: "Re: mail lossage?"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
<i>&gt; Andy&gt; Well ... I assumed everything which has a driver-name starting with</i><br>
<i>&gt; Andy&gt; net-should be left out ... This could be dynamically added to the</i><br>
<i>&gt; Andy&gt; basename when exporting.</i><br>
<i>&gt; OK, I thought some more about it. Maybe the proper solution is to</i><br>
<i>&gt; view this as an authorization question. We change sane_get_devices()</i><br>
<i>&gt; and sane_open() to accept a pointer to an authorization structure. </i><br>
O.K. - we probably should solve the problem of authentication now to<br>
avoid running into it later.<br>
<p>
I can think of two possible ways :<br>
<p>
1. Introduce a new function sane_auth(char *host,char *uid,char *passwd);<br>
that will set the authentication information, if it is necessary.<br>
If authentication is compiled into SANE, it will refuse <br>
sane_get_devices and sane_open with SANE_AUTH, if no correct auth-info<br>
is set. This is compatible to old clients/servers/specs.<br>
2. Add such parameters to sane_getdev and _open. This makes sane somewhat<br>
more state-free, but is incompatible in two ways :<br>
a) the function prototypes change<br>
b) authorization is not that naturally performed "on demand" ...<br>
<p>
<i>&gt; As part of that authorization structure, we can keep info on whether this</i><br>
<i>&gt; is a local user or a remote user (e.g., a NULL authorization pointer</i><br>
<i>&gt; would imply local user as defined by getuid() etc).</i><br>
Well maybe we should add authorization for local users, too.<br>
<p>
Suggestion :<br>
<p>
/etc/saneconf/passwd : lines of username:crypt-passwd<br>
/etc/saneconf/group : lines of groupname:username,username,...<br>
<p>
Each driver will maintain its own authorization data which should be<br>
capable of doing something along the lines of .httpauth :<br>
<p>
etc/saneconf/pbmsane<br>
device pbm-test1<br>
allow realuser root becka # derived from getuid<br>
allow realgroup sane # derived from getgid<br>
allow user name # name set via a dialog<br>
allow group name # the authenticated user is in group name<br>
or deny the same possibilities as above<br>
<p>
The file would be parsed in the following way :<br>
By default the state of the user is "denied".<br>
The lines are parsed one by one and the appropriate checks are made.<br>
Only such check which change the current state are done. I.e. if<br>
the state already is "allow", no further "allow" checks are made.<br>
Note that denying by "sane-user" means "require valid sane-login, <br>
but deny list"<br>
<p>
<p>
<i>&gt; The net backend (metanet) can then decide what to do with a </i><br>
<i>&gt; get_device() request based on the authorization: if it's a local user, </i><br>
<i>&gt; return remote devices, otherwise, return an empty list.</i><br>
This can be handled very simply with this scheme :<br>
<p>
etc/saneconf/metanet<br>
device bla<br>
allow realuser all<br>
deny realuser netsane<br>
<p>
This will result in metanet denying access to netsaned (which runs suid netsane)<br>
thus giving the secified behaviour.<br>
<p>
CU,ANdy<br>
<p>
<pre>
--
==============================================================================
Andreas Beck | Email : &lt;<a href="mailto:becka@sunserver1.rz.uni-duesseldorf.de">becka@sunserver1.rz.uni-duesseldorf.de</a>&gt;
=== World-Wide-Web URL : <a href="http://sunserver1.rz.uni-duesseldorf.de/~becka">http://sunserver1.rz.uni-duesseldorf.de/~becka</a> ===
==============================================================================
<p>
<pre>
---
Source code, list archive, and docs: <a href="http://www.azstarnet.com/~axplinux/sane/">http://www.azstarnet.com/~axplinux/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@azstarnet.com">majordomo@azstarnet.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0016.html">becka@sunserver1.rz.uni-duesseldorf.de: "Re: sane-0.3: it's almost for real now!"</a>
<li> <b>Previous message:</b> <a href="0014.html">Michael K. Johnson: "Re: sane-0.3: it's almost for real now!"</a>
<li> <b>In reply to:</b> <a href="0012.html">David Mosberger-Tang: "Re: mail lossage?"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>