Renaming NIS+ objects

Renaming NIS+ objects

Post by Brad Debroni 389-327 » Wed, 24 Jan 1996 04:00:00

Is there any way to rename a NIS+ table? I cannot find any program
that allows this to be done, but the man page for nis_modify()

     The function nis_modify() will modify the  object  named  by
     name  to  the  field values in the object pointed to by obj.
     This object should contain a copy of  the  object  from  the
     name  space that is being modified. This operation will fail
     with the error NIS_NOTSAMEOBJ if the  object  identifier  of
     the  passed  object  does not match that of the object being
     modified in the namespace.

     Note: Normally the contents of the  member  zo_name  in  the
     nis_object  structure  would  be  constructed  from the name
     passed in the name parameter. However, if it is non-NULL the
     client  library  will  use the name in the zo_name member to
     perform a rename operation on the object. This name must not
     contain  any  unquoted  `.'(dot) characters. If these condi-
     tions are not met the operation will  fail  and  return  the
     NIS_BADNAME error code.

This lead me to believe that I could write my own rename utility.
However, I read the table object in, change the zo_name field to
point to the string containing the new name (and a nis_print_object()
on that object shows the new name), and call nis_modify().
It returns a NIS_SUCCESS result code, but when I look at the
namespace, the table has not been renamed, and when I look at the
log using nislog, it shows that the object has been modified, but
that it still has its old name.

Is this possible, or are the man pages misleading? Thanks!

Brad Debroni
BC Systems Corporation


1. Renaming symbols in an object file

Is there a utility to rename symbols in an object file. It's the sort
of option you would expect to find in objcopy but it isn't there. You
can make a copy of a symbol under a different name but the old one
still remains; and in most cases this can't be deleted because it is
still required for final linking.

I was thinking of adding the option myself to objcopy. But the volume
of code in binutils is a bit daunting.

Many thanks for any help/suggestions,


2. Redhat 7.1 on a Presario 1110 (MediaGX)... can't boot

3. can you rename objects in dmgr?

4. HP Laserjet 1100 and FreeBSd 4.1.1

5. Proposal for object/library symbol renaming utility

6. ? lost win95 fat

7. how to rename nis domain?

8. libc 5.4.4 - StarOffice needs it - not on sunsite

9. "renaming" a NIS+ zone

10. rename() doesn't return -1 when it does not really rename

11. NIS+ says 10,000 objects are optimal, what then?

12. Change a NIS+ directory object

13. Can I move NIS+objects from 2.4 to 2.6 ?