PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > mysql.general > How to grant privileges using REVOKE statement
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
How to grant privileges using REVOKE statement

Réponse
 
LinkBack Outils de la discussion
Vieux 18/10/2007, 12h58   #1
Rafal Somla
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to grant privileges using REVOKE statement

Hi All!

Here is a funny thing I come across when investigating our privilege control
system. Consider the following situation:

mysql> GRANT ALL ON `%o`.* TO rafal;
mysql> GRANT SELECT ON foo.* TO rafal;

The intention is that rafal has all privileges for all objects in databases
whose name ends with 'o' but he has read-only access to the tables in the 'foo'
database.

Now imagine DBA decides that rafal should no longer be able to see the data
inside the foo database. Then he might issue command

mysql> REVOKE ALL ON foo.* FROM rafal;

and... tada! rafal has all rights to all tables inside database 'foo'.

The reason is that REVOKE command, when it sees that all rights have been
revoked, removes the corresponding entry in the privilege table inside mysql
database (mysql.db in that case). But removing such entry doesn't mean that all
rights will be taken away, since, as this example illustrates, some other entry
can apply after removing that one and in fact give more rights than before!

A solution would be to not remove any entries when REVOKE is executed - just
clear the corresponding flags in the existing entry.

Best,
Rafal
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 16h19.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,07333 seconds with 9 queries