diff options
author | jkar8572 <jkar8572> | 2001-06-18 03:15:44 +0000 |
---|---|---|
committer | jkar8572 <jkar8572> | 2001-06-18 03:15:44 +0000 |
commit | 865c3f4714cd2da77d590efc7dd3f7c2bcfb7cf9 (patch) | |
tree | 5d27d3e0354b01338c13b40725112305ab7e9d67 | |
parent | d79a941ed1e43fdc1ad6ad56d11ae13e92a34b7e (diff) | |
download | linuxquota-865c3f4714cd2da77d590efc7dd3f7c2bcfb7cf9.tar.gz |
Added -V to manpages of convertquota
Fixed SEGFAULT bug in rquota_server (when quota init failed)
-rw-r--r-- | convertquota.8 | 3 | ||||
-rw-r--r-- | convertquota.c | 2 | ||||
-rw-r--r-- | rquota_server.c | 9 |
3 files changed, 11 insertions, 3 deletions
diff --git a/convertquota.8 b/convertquota.8 index 705b045..34db1b5 100644 --- a/convertquota.8 +++ b/convertquota.8 @@ -32,6 +32,9 @@ convert user quota file. This is the default. .TP .B -g convert group quota file. +.TP +.B -V +print version information. .SH FILES .TP 20 .B aquota.user diff --git a/convertquota.c b/convertquota.c index 9d4bb96..bb7ac07 100644 --- a/convertquota.c +++ b/convertquota.c @@ -151,7 +151,7 @@ int main(int argc, char **argv) if (ucv) convert_file(USRQUOTA); - if (ucv) + if (gcv) convert_file(GRPQUOTA); return 0; diff --git a/rquota_server.c b/rquota_server.c index a78cf20..b1e7e80 100644 --- a/rquota_server.c +++ b/rquota_server.c @@ -9,7 +9,7 @@ * * This part does the lookup of the info. * - * Version: $Id: rquota_server.c,v 1.3 2001/06/07 17:51:43 jkar8572 Exp $ + * Version: $Id: rquota_server.c,v 1.4 2001/06/18 03:15:44 jkar8572 Exp $ * * Author: Marco van Wieringen <mvw@planets.elm.net> * @@ -28,7 +28,7 @@ #include <syslog.h> #include <time.h> #include <netdb.h> -#ifdef HOST_ACCESS +#ifdef HOSTS_ACCESS #include <tcpd.h> #endif @@ -201,6 +201,8 @@ setquota_rslt *setquotainfo(int flags, caddr_t * argp, struct svc_req *rqstp) break; } endmntent(mntf); + if (!handles[0]) + goto out; if (!(dquot = handles[0]->qh_ops->read_dquot(handles[0], id))) goto out; if (qcmd == QCMD(Q_RPC_SETQLIM, type) || qcmd == QCMD(Q_RPC_SETQUOTA, type)) { @@ -305,6 +307,8 @@ getquota_rslt *getquotainfo(int flags, caddr_t * argp, struct svc_req * rqstp) break; } endmntent(mntf); + if (!handles[0]) + goto out; if (!(flags & ACTIVE) || QIO_ENABLED(handles[0])) dquot = handles[0]->qh_ops->read_dquot(handles[0], id); if (dquot) { @@ -313,6 +317,7 @@ getquota_rslt *getquotainfo(int flags, caddr_t * argp, struct svc_req * rqstp) QIO_ENABLED(handles[0]) ? TRUE : FALSE; servutil2netdqblk(&result.getquota_rslt_u.gqr_rquota, &dquot->dq_dqb); } +out: dispose_handle_list(handles); return (&result); } |