]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
rename DB_READ, DB_WRITE to AFS_READ, AFS_WRITE
authorAndre Noll <maan@systemlinux.org>
Sat, 3 Mar 2007 13:26:49 +0000 (14:26 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 3 Mar 2007 13:26:49 +0000 (14:26 +0100)
INSTALL
NEWS
README.mysql
command.c
mysql_selector.cmd
playlist_selector.cmd
server.cmd
user_list.c
user_list.h

diff --git a/INSTALL b/INSTALL
index d28a4d92f4b1a21b92a363386f17366244e3690a..83d598eabb5b2ce5b2b14eca8937e5a93b13e7d9 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -42,7 +42,7 @@ following commands:
 
        target=~/.paraslash/server.users
        key=~/.paraslash/key.pub.bar
-       perms=DB_READ,DB_WRITE,VSS_READ,VSS_WRITE
+       perms=AFS_READ,AFS_WRITE,VSS_READ,VSS_WRITE
        mkdir -p ~/.paraslash
        echo "user bar $key $perms" >> $target
 
diff --git a/NEWS b/NEWS
index f0fe84a0abb5db158a1046904dc924c6d9e8d0d4..429cd34a1796e0e6d34b63e28b2e2e123109631b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,8 +5,11 @@ NEWS
 0.?.? (to be announced) "neural discharge"
 ------------------------------------------
 
+       - permission flags DB_READ,DB_WRITE have been renamed to AFS_READ
+         and AFS_WRITE.
        - fix a bug in para_filter that caused decoding of aac files
          to start only after a few seconds.
+       - fix osx_writer hangs
 
 -----------------------------------------
 0.2.15 (2007-02-16) "inductive resonance"
index 87ee27b71a2c5557f8e1adf9a77d60fbf40b90eb..986afb307e82bf4e46a658556a41eec4a15f4935 100644 (file)
@@ -14,8 +14,8 @@ First of all, make sure that
        - mysqld is running
        - para_server is running and compiled with mysql support
          (type "para_client si" to find out)
-       - the user who runs para_client has the paraslash DB_WRITE
-         and DB_READ permissions set in server.users
+       - the user who runs para_client has the paraslash AFS_WRITE
+         and AFS_READ permissions set in server.users
        - the user who runs para_server has create privileges on the
          mysql server.
 
index 325f768604ef192ef986e47ca0b603de92938cbb..77d3ef7f0ddd223b0408285f1df18e61b45ddd6f 100644 (file)
--- a/command.c
+++ b/command.c
@@ -78,8 +78,8 @@ static char *cmd_perms_itohuman(unsigned int perms)
 {
        char *msg = para_malloc(5 * sizeof(char));
 
-       msg[0] = perms & DB_READ? 'a' : '-';
-       msg[1] = perms & DB_WRITE? 'A' : '-';
+       msg[0] = perms & AFS_READ? 'a' : '-';
+       msg[1] = perms & AFS_WRITE? 'A' : '-';
        msg[2] = perms & VSS_READ? 'v' : '-';
        msg[3] = perms & VSS_WRITE? 'V' : '-';
        msg[4] = '\0';
@@ -919,7 +919,7 @@ out:
        free(command);
        free(argv);
        mmd_lock();
-       if (cmd && (cmd->perms & DB_WRITE) && ret >= 0)
+       if (cmd && (cmd->perms & AFS_WRITE) && ret >= 0)
                mmd->events++;
        mmd->active_connections--;
        mmd_unlock();
index 7696352df6b80eca9ccef6196fab818c9d1b6436..6cabd4f104d9472da08964cd218a21e6c9172026 100644 (file)
@@ -7,14 +7,14 @@ IN: server user_list
 SN: list of mysql selector commands
 ---
 N: cam
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: copy all metadata
 U: cam source dest1 [dest2 ...]
 H: Copy attributes and other meta data from source file to destination
 H: file(s). Useful for files that have been renamed.
 ---
 N: cdb
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: create database
 U: cdb [name]
 H:
@@ -25,7 +25,7 @@ H:
 H: The optional name defaults to 'paraslash' if not given.
 ---
 N: clean
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: nuke invalid entries in database
 U: clean
 H: If the vrfy command shows you any invalid entries in your database,
@@ -33,59 +33,59 @@ H: you can get rid of them with clean. Always run 'upd' and 'vrfy'
 H: before running this command. Use with caution!
 ---
 N: cs
-P: VSS_WRITE | DB_READ | DB_WRITE
+P: VSS_WRITE | AFS_READ | AFS_WRITE
 D: change stream
 U: cs [s]
 H: Selects stream s or prints current stream when s was not given.
 ---
 N: csp
-P: VSS_WRITE | DB_READ
+P: VSS_WRITE | AFS_READ
 D: change stream and play
 U: csp s
 H: Select stream s and start playing. If this results in a
 H: stream-change, skip rest of current audio file.
 ---
 N: da
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: drop attribute from database
 U: da att
 H: Use with caution. All info on attribute att will be lost.
 ---
 N: hist
-P: DB_READ
+P: AFS_READ
 D: print history
 U: hist
 H: Print list of all audio files together with number of days since
 H: each file was last played.
 ---
 N: info
-P: DB_READ
+P: AFS_READ
 D: print database info
 U: info [af]
 H: print database informations for audio file af. Current audio file
 H: is used if af is not given.
 ---
 N: la
-P: DB_READ
+P: AFS_READ
 D: list attributes
 U: la [af]
 H: List attributes of audio file af or of current audio file when
 H: invoked without arguments.
 ---
 N: laa
-P: DB_READ
+P: AFS_READ
 D: list available attributes
 U: laa
 H: print list of all attributes defined in the database
 ---
 N: last
-P: DB_READ
+P: AFS_READ
 D: print list of audio files, ordered by lastplayed time
 U: last [n]
 H: The optional number n defaults to 10 if not specified.
 ---
 N: ls
-P: DB_READ
+P: AFS_READ
 D: list all audio files that match a LIKE pattern
 U: ls [pattern]
 H: If pattern was not given, print list of all audio files known
@@ -93,7 +93,7 @@ H: to the mysql selector. See the documentation of mysql
 H: for the definition of LIKE patterns.
 ---
 N: mbox
-P: DB_READ
+P: AFS_READ
 D: dump audio file list in mbox format
 U: mbox [p]
 H: Dump list of audio files in mbox format (email) to stdout. If
@@ -121,7 +121,7 @@ H: suitable script which adds a paraslash stream where exactly
 H: these files are admissable or does whatever thou wilt.
 ---
 N: mv
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: rename entry in database
 U: mv oldname newname
 H: Rename oldname to newname. This updates the data table to reflect
@@ -130,7 +130,7 @@ H: is kept.  If newname is a full path, the dir table is updated as
 H: well.
 ---
 N: na
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: add new attribute to database
 U: na att
 H: This adds a column named att to your mysql database. att should
@@ -138,7 +138,7 @@ H: only contain letters and numbers, in paricular, '+' and '-' are
 H: not allowed.
 ---
 N: ne
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: add new database entries
 U: ne file1 [file2 [...]]
 H: Add the given filename(s) to the database, where file1,... must
@@ -146,13 +146,13 @@ H: be full path names. This command might be much faster than 'upd'
 H: if the number of given files is small.
 ---
 N: ns
-P: VSS_WRITE | DB_READ | DB_WRITE
+P: VSS_WRITE | AFS_READ | AFS_WRITE
 D: change to next stream
 U: ns
 H: Cycle forwards through stream list.
 ---
 N: pic
-P: DB_READ
+P: AFS_READ
 D: get picture by name or by identifier
 U: pic [name]
 H: Dump jpg image that is associated to given audio file (current
@@ -165,7 +165,7 @@ H:
 H:     para_client pic '#123' > pic123.jpg
 ---
 N: picadd
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: add picture to database
 U: picadd [picname]
 H: Read jpeg file from stdin and store it as picname in database.
@@ -175,44 +175,44 @@ H:
 H:     para_client picadd foo.jpg < foo.jpg
 ---
 N: picass
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: associate a picture to file(s)
 U: picass pic_id file1 [file2...]
 H: Associate the picture given by pic_id to all given files.
 ---
 N: picch
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: change name of picture
 U: picch id new_name
 H: Asign new_name to picture with identifier id.
 ---
 N: picdel
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: delete picture from database
 U: picdel id1 [id2...]
 H: Delete each given picture from database.
 ---
 N: piclist
-P: DB_READ
+P: AFS_READ
 D: print list of pictures
 U: piclist
 H: Print id, name and length of each picture contained in the
 H: database.
 ---
 N: ps
-P: VSS_WRITE | DB_READ | DB_WRITE
+P: VSS_WRITE | AFS_READ | AFS_WRITE
 D: change to previous stream
 U: ps
 H: Cycle backwards through stream list.
 ---
 N: rm
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: remove entries from database
 U: rm name1 [name2 [...]]
 H: Remove name1, name2, ... from the data table. Use with caution.
 ---
 N: sa
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: set/unset attributes
 U: sa at1<'+' | '-'> [at2<'+' | '-'> ] [af1 ...]
 H: Set ('+') or unset ('-') attribute at1, at2 etc. for given list of
@@ -225,7 +225,7 @@ H: sets the 'rock' and the 'punk' attribute but unsets the 'classic'
 H: attribute.
 ---
 N: skip
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: skip subsequent audio files(s)
 U: skip n [s]
 H: Skip the next n audio files of stream s. This is equivalent to the
@@ -233,7 +233,7 @@ H: command 'sl n s', followed by 'us name' for each name the output of
 H: sl.
 ---
 N: sl
-P: DB_READ
+P: AFS_READ
 D: print score list
 U: sl n [s]
 H: Print sorted list of maximal n lines. Each line is an admissible
@@ -246,14 +246,14 @@ H:
 H: shows you the audio file the server would select right now.
 ---
 N: snp
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: set numplayed
 U: snp number af1 [af2 ...]
 H: Update the numplayed field in the data table for all given audio
 H: files.
 ---
 N: stradd
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: add stream
 U: stradd s
 H: Add stream s to the list of available streams. The stream
@@ -267,34 +267,34 @@ H: A given audio file is admissible for this stream iff its basename
 H: does not contain the string 'Madonna'.
 ---
 N: strdel
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: delete stream
 U: strdel s
 H: Remove stream s from database.
 ---
 N: streams
-P: DB_READ
+P: AFS_READ
 D: list streams
 U: streams
 H: Print list of available streams. Use 'cs' to switch to any of
 H: these.
 ---
 N: strq
-P: DB_READ
+P: AFS_READ
 D: query stream definition
 U: strq [s]
 H: Print definition of stream s to stdout. Use current stream if s was
 H: not given.
 ---
 N: summary
-P: DB_READ
+P: AFS_READ
 D: list attributes
 U: summary
 H: Print a list of attributes together with number of audio
 H: files having that attribute set.
 ---
 N: upd
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: update database
 U: upd
 H: This command uses the --audio_file_dir option of para_server to
@@ -303,20 +303,20 @@ H: database. Use this command if you got new files or if you have
 H: moved some files around.
 ---
 N: us
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: update lastplayed time
 U: us name
 H: Update lastplayed time without actually playing the thing.
 ---
 N: verb
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: send verbatim sql query
 U: verb cmd
 H: Send cmd to mysql server. For expert/debugging only. Note that cmd
 H: usually must be escaped. Use only if you know what you are doing!
 ---
 N: vrfy
-P: DB_READ
+P: AFS_READ
 D: list invalid entries in database
 U: vrfy
 H: Show what clean would delete. Run 'upd' before this command to make
index e84e97ee592fa4f9944355ffbd3677070a80e4af..294adef4d7df8bb2dd1d2c1f4e19ce1b6dc4a871 100644 (file)
@@ -7,13 +7,13 @@ IN: server user_list
 SN: list of playlist selector commands
 ---
 N: ppl
-P: DB_READ
+P: AFS_READ
 D: print playlist
 U: ppl
 H: Print out the current playlist
 ---
 N: lpl
-P: DB_WRITE
+P: AFS_WRITE
 D: load playlist
 U: lpl
 H: Read a new playlist from stdin. Example:
index ad175c8df14ce9f3eb66d624e72f3998cd303ff7..d9134693ebf362e43a024576adfc98e25b7244e0 100644 (file)
@@ -7,7 +7,7 @@ IN: server user_list
 SN: list of server commands
 ---
 N: chs
-P: DB_READ | DB_WRITE
+P: AFS_READ | AFS_WRITE
 D: change the current audio file selector
 U: chs [new_selector]
 H: Shutdown the current selector and activate new_selector. If no
index 1143f2d58aa1605d77324fea14bf682e409d1ab4..64f211499fcf51416b9b2a080e1d1798e004c0b3 100644 (file)
@@ -72,10 +72,10 @@ static void populate_user_list(char *user_list_file)
                                u->perms |= VSS_READ;
                        else if (!strcmp(tmp[num], "VSS_WRITE"))
                                u->perms |= VSS_WRITE;
-                       else if (!strcmp(tmp[num], "DB_READ"))
-                               u->perms |= DB_READ;
-                       else if (!strcmp(tmp[num], "DB_WRITE"))
-                               u->perms |= DB_WRITE;
+                       else if (!strcmp(tmp[num], "AFS_READ"))
+                               u->perms |= AFS_READ;
+                       else if (!strcmp(tmp[num], "AFS_WRITE"))
+                               u->perms |= AFS_WRITE;
                        else /* unknown permission */
                                PARA_WARNING_LOG("ignoring unknown permission: %s\n",
                                        tmp[num]);
index ce940376fdc67128e6ae9636281978f7523273ec..c18eb57d049551fc8fe30e1d67c08795395a5389 100644 (file)
 /**
  * permission flags that can be set individually for any server command
  *
- * - DB_READ: command reads from the database
- * - DB_WRITE: command changes the contents of the database
+ * - AFS_READ: read-only command of the audio file selector
+ * - AFS_WRITE: command changes state of the audio file selector
  * - VSS_READ: command reads information about the current audio stream
  * - VSS_WRITE: command changes the current audio stream
  */
-enum {DB_READ = 1, DB_WRITE = 2, VSS_READ = 4, VSS_WRITE = 8};
+enum {AFS_READ = 1, AFS_WRITE = 2, VSS_READ = 4, VSS_WRITE = 8};
 
 /**
  * data needed to authenticate the user