Menu

#180 0.75: document & fix use of [ .. ]

feature-request
closed-fixed
library (43)
6
2002-05-26
2002-02-13
No

>
>You might have a little more luck if you tried
>
> [user_name='%u' and password=PASSWORD('%p') and
service='web_proxy']
>
>This is completely untested by me, right now, but if I
recall correctly
>it should work.
>
>The reason this may work is actually a little bit of a
side-effect of
>supporting the alternative format for the control
tokens, but I think I
>was thinking about this exact need when I coded it N
years ago.
>
>I don't know off hand if there is a way to encode '['
or ']' in a module
>argument and have the module actually see these
characters, but I'd be
>very happy for you to play with everything you can
along these lines,
>report what works/fails and I'll consider it a bug
report/feature
>request...
>

Just letting those interested know that using the '['
and ']' characters
solved the problem of an argument with spaces being
split. Here is my
"/etc/pam.d/squid" config file:

auth required pam_mysql.so user=passwd_query
passwd=mada
db=eminence [query=select user_name from
internet_service where
user_name='%u' and password=PASSWORD('%p') and
service='web_proxy']
account required pam_mysql.so user=passwd_query
passwd=mada
db=eminence [query="select user_name from
internet_service where
user_name='%u' and password=PASSWORD('%p') and
service='web_proxy']

I'll probably send my patch to the pam_mysql project
page on sourceforge
after I've done a bit more testing. In the meantime,
let me know if you
want a copy.

Also, it might be worthwhile makeing the use of the
square brackets a
documented feature of PAM. Being able to encode the
square brackets in
an argument would also make sense but not having looked
at the code I
don't know weather it is implemented. Let me know if
you would think it
would be worthwhile me looking at the PAM source.

Russell Kliese

Discussion

  • Andrew G. Morgan

    • priority: 5 --> 6
     
  • Andrew G. Morgan

    • labels: 105386 --> library
    • assigned_to: nobody --> agmorgan
    • summary: 0.75: document(fix) use of [ .. ] --> 0.75: document & fix use of [ .. ]
    • status: open --> closed-fixed
     
  • Andrew G. Morgan

    Logged In: YES
    user_id=37107

    Checking in CHANGELOG;
    /cvsroot/pam/Linux-PAM/CHANGELOG,v <-- CHANGELOG
    new revision: 1.133; previous revision: 1.132
    done
    Checking in doc/pam_source.sgml;
    /cvsroot/pam/Linux-PAM/doc/pam_source.sgml,v <--
    pam_source.sgml
    new revision: 1.8; previous revision: 1.7
    done
    Checking in libpam/pam_misc.c;
    /cvsroot/pam/Linux-PAM/libpam/pam_misc.c,v <-- pam_misc.c
    new revision: 1.3; previous revision: 1.2
    done

     

Log in to post a comment.

MongoDB Logo MongoDB