Back to index

glibc  2.9
nis_remove.c File Reference
#include <rpcsvc/nis.h>
#include "nis_xdr.h"
#include "nis_intern.h"

Go to the source code of this file.


nis_result * nis_remove (const_nis_name name, const nis_object *obj)

Function Documentation

nis_result* nis_remove ( const_nis_name  name,
const nis_object *  obj 

Definition at line 26 of file nis_remove.c.

  nis_result *res;
  nis_error status;
  struct ns_request req;

  res = calloc (1, sizeof (nis_result));
  if (res == NULL)
    return NULL;

  req.ns_name = (char *)name;

  if (obj != NULL)
      req.ns_object.ns_object_len = 1;
      req.ns_object.ns_object_val = nis_clone_object (obj, NULL);
      req.ns_object.ns_object_len = 0;
      req.ns_object.ns_object_val = NULL;

  if ((status = __do_niscall (name, NIS_REMOVE, (xdrproc_t) _xdr_ns_request,
                           (caddr_t) &req, (xdrproc_t) _xdr_nis_result,
                           (caddr_t) res, MASTER_ONLY,
                           NULL)) != RPC_SUCCESS)
    NIS_RES_STATUS (res) = status;

  nis_destroy_object (req.ns_object.ns_object_val);

  return res;

Here is the call graph for this function:

Here is the caller graph for this function: