00001 #include <stdlib.h> 00002 #include <grass/dbmi.h> 00003 #include "macros.h" 00004 #include "dbstubs.h" 00005 00011 int 00012 db_d_grant_on_table() 00013 { 00014 dbString tableName; 00015 int priv, to; 00016 int stat; 00017 00018 db_init_string (&tableName); 00019 00020 /* get the arg(s) */ 00021 DB_RECV_STRING(&tableName); 00022 DB_RECV_INT(&priv); 00023 DB_RECV_INT(&to); 00024 00025 /* call the procedure */ 00026 stat = db_driver_grant_on_table ( &tableName, priv, to); 00027 db_free_string (&tableName); 00028 00029 /* send the return code */ 00030 if (stat != DB_OK) 00031 { 00032 DB_SEND_FAILURE(); 00033 return DB_OK; 00034 } 00035 DB_SEND_SUCCESS(); 00036 00037 /* no results */ 00038 00039 return DB_OK; 00040 }