version 1.19, 2015/11/17 15:01:28 |
version 1.20, 2016/03/16 15:41:11 |
|
|
err(1, "pledge"); |
err(1, "pledge"); |
|
|
if (rpcs & DODUMP) { |
if (rpcs & DODUMP) { |
estat = clnt_call(client, RPCMNT_DUMP, xdr_void, (char *)0, |
estat = clnt_call(client, RPCMNT_DUMP, xdr_void, NULL, |
xdr_mntdump, (char *)&mntdump, timeout); |
xdr_mntdump, (char *)&mntdump, timeout); |
if (estat != RPC_SUCCESS) { |
if (estat != RPC_SUCCESS) { |
fprintf(stderr, "showmount: Can't do Mountdump rpc: "); |
fprintf(stderr, "showmount: Can't do Mountdump rpc: "); |
|
|
} |
} |
} |
} |
if (rpcs & DOEXPORTS) { |
if (rpcs & DOEXPORTS) { |
estat = clnt_call(client, RPCMNT_EXPORT, xdr_void, (char *)0, |
estat = clnt_call(client, RPCMNT_EXPORT, xdr_void, NULL, |
xdr_exports, (char *)&exports, timeout); |
xdr_exports, (char *)&exports, timeout); |
if (estat != RPC_SUCCESS) { |
if (estat != RPC_SUCCESS) { |
fprintf(stderr, "showmount: Can't do Exports rpc: "); |
fprintf(stderr, "showmount: Can't do Exports rpc: "); |
|
|
int bool, val, val2; |
int bool, val, val2; |
char *strp; |
char *strp; |
|
|
*mlp = (struct mountlist *)0; |
*mlp = NULL; |
if (!xdr_bool(xdrsp, &bool)) |
if (!xdr_bool(xdrsp, &bool)) |
return (0); |
return (0); |
while (bool) { |
while (bool) { |
mp = malloc(sizeof(struct mountlist)); |
mp = malloc(sizeof(struct mountlist)); |
if (mp == NULL) |
if (mp == NULL) |
return (0); |
return (0); |
mp->ml_left = mp->ml_right = (struct mountlist *)0; |
mp->ml_left = mp->ml_right = NULL; |
strp = mp->ml_host; |
strp = mp->ml_host; |
if (!xdr_string(xdrsp, &strp, RPCMNT_NAMELEN)) |
if (!xdr_string(xdrsp, &strp, RPCMNT_NAMELEN)) |
return (0); |
return (0); |
|
|
int bool, grpbool; |
int bool, grpbool; |
char *strp; |
char *strp; |
|
|
*exp = (struct exportslist *)0; |
*exp = NULL; |
if (!xdr_bool(xdrsp, &bool)) |
if (!xdr_bool(xdrsp, &bool)) |
return (0); |
return (0); |
while (bool) { |
while (bool) { |
ep = malloc(sizeof(struct exportslist)); |
ep = malloc(sizeof(struct exportslist)); |
if (ep == NULL) |
if (ep == NULL) |
return (0); |
return (0); |
ep->ex_groups = (struct grouplist *)0; |
ep->ex_groups = NULL; |
strp = ep->ex_dirp; |
strp = ep->ex_dirp; |
if (!xdr_string(xdrsp, &strp, RPCMNT_PATHLEN)) |
if (!xdr_string(xdrsp, &strp, RPCMNT_PATHLEN)) |
return (0); |
return (0); |