[icecast-dev] Client auth with mysql

Mathieu Arnold mat at mat.cc
Fri May 14 13:37:42 PDT 2004



+-Le 14/05/2004 15:40 -0400, Amy Beam a dit :
| Hello Mathieu,
| 
| This is a great idea! So great that I have been trying to do it for a
| while now. However my knowledge of all the ins and outs of Icecast are
| lacking. I would love to implement your solution here hopefully you can
| answer a few questions for me!
| 
| 1. What version of Icecast should I make these changes to? It looks like
| 2.0.0

Yes, 2.0.0

| 2. Can I see your database schema? What are the tables called, what fields
| in each table?

Well, you can specify your queries so...

| 3. What happens when User1 is logged in and User2 tries to log in with
| User1's information. Does it lock User2 out or does it serve him a stream?

Depends on how you do your things.

| 4. Do you have this code already implemented and in a .tar.gz file that I
| can download?

No, but you can take 2.0.0 sources and apply the patch :-)

| Thank you so much!!
| Amy Beam
| 
| ----- Original Message ----- 
| From: "Mathieu Arnold" <mat at mat.cc>
| To: <icecast-dev at xiph.org>
| SeWednesdaysday, May 12, 2004 1:24 PM
| Subject: [icecast-dev] Client auth with mysql
| 
| 
|> Hi,
|> 
|> I have a customer (a small french music producer) who's putting up a
| "paid"
|> radio, it's not really paid, because you don't buy an access, you just by
| a
|> cd, and you get radio access.
|> So, I needed to check access to the radio, in an intelligent manner :-)
|> A collegue of mine started doing things, he ended up with scripts adding
| ip's
|> to the server's firewall...
|> 
|> I though better of it and I told myself that it should not be that
| difficult
|> to add mysql support in icecast (no, no, don't run, please).
|> 
|> So, that's what I did :-)
|> <http://mat.cc/distfiles/icecast-mysql.diff>
|> 
|> it adds some config params to a <mount> section :
|> 
|> <sql_server>sql-server</sql_server>
|> <sql_login>login</sql_login>
|> <sql_password>password</sql_password>
|> <sql_dbname>database</sql_dbname>
|> <sql_field>url-field</sql_field>
|> <sql_query>select cle from client where radio = 1 and cle =
| '%s'</sql_query>
|> 
|> which are passed to the source it correspond to.
|> 
|> and when you call a source say, /foo.mp3?url-field=something
|> It'll put the something in the sql query.
|> 
|> It should be connection loss tolerant, but I'm not sure about it :-)
|> 
|> For those wanting to try it, you'll have to have mysql/mysql.h in your
|> include path, and to add -llibmysqlclient -Lpath to have it compile :-)
|> If I had known a bit of autoconf & Co, I'd have added a --with-mysql with
|> proper #ifdef things to comment out my mess, but I don't, if you have a
| hint
|> on that, I'll happily do it :-)
|> 
|> ps: all and every comment welcome ;-)
|> -- 
|> Mathieu Arnold
|> --- >8 ----
|> List archives:  http://www.xiph.org/archives/
|> icecast project homepage: http://www.icecast.org/
|> To unsubscribe from this list, send a message to
| 'icecast-dev-request at xiph.org'
|> containing only the word 'unsubscribe' in the body.  No subject is
|> needed. Unsubscribe messages sent to the list will be ignored/filtered.
| 

<p><p>
-- 
Mathieu Arnold
--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.




More information about the Icecast-dev mailing list