about summary refs log tree commit diff
path: root/nis/nss_nisplus/nisplus-publickey.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nss_nisplus/nisplus-publickey.c')
-rw-r--r--nis/nss_nisplus/nisplus-publickey.c72
1 files changed, 36 insertions, 36 deletions
diff --git a/nis/nss_nisplus/nisplus-publickey.c b/nis/nss_nisplus/nisplus-publickey.c
index 91cfba730e..4c596b8ada 100644
--- a/nis/nss_nisplus/nisplus-publickey.c
+++ b/nis/nss_nisplus/nisplus-publickey.c
@@ -61,10 +61,10 @@ _nss_nisplus_getpublickey (const char *netname, char *pkey)
 	    netname, domain);
 
   if (buf[strlen (buf)-1] != '.')
-    strcat(buf, ".");
+    strcat (buf, ".");
 
-  res = nis_list(buf, USE_DGRAM+NO_AUTHINFO+FOLLOW_LINKS+FOLLOW_PATH,
-		 NULL, NULL);
+  res = nis_list (buf, USE_DGRAM+NO_AUTHINFO+FOLLOW_LINKS+FOLLOW_PATH,
+		  NULL, NULL);
 
   retval = niserr2nss (res->status);
 
@@ -192,7 +192,7 @@ parse_grp_str (const char *s, gid_t *gidp, int *gidlenp, gid_t *gidlist)
       return NSS_STATUS_NOTFOUND;
     }
 
-  *gidp = (atoi (s));
+  *gidp = atoi (s);
 
   gidlen = 0;
 
@@ -238,7 +238,7 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
   /* XXX but we cant, for now. XXX */
   res = nis_list (sname, USE_DGRAM+NO_AUTHINFO+FOLLOW_LINKS+FOLLOW_PATH,
 		  NULL, NULL);
-  switch(res->status)
+  switch (res->status)
     {
     case NIS_SUCCESS:
     case NIS_S_SUCCESS:
@@ -274,10 +274,10 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
 	      netname, domain);
     }
 
-  len = ENTRY_LEN(res->objects.objects_val, 0);
-  strncpy(principal, ENTRY_VAL(res->objects.objects_val, 0), len);
+  len = ENTRY_LEN (res->objects.objects_val, 0);
+  strncpy (principal, ENTRY_VAL (res->objects.objects_val, 0), len);
   principal[len] = '\0';
-  nis_freeresult(res);
+  nis_freeresult (res);
 
   if (principal[0] == '\0')
     return NSS_STATUS_UNAVAIL;
@@ -287,45 +287,45 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
    *      LOCAL entry in **local** cred table.
    */
   domain = nis_local_directory ();
-  if ((strlen(principal)+strlen(domain)+45) >
+  if ((strlen (principal)+strlen (domain)+45) >
       (size_t) NIS_MAXNAMELEN)
     {
       syslog (LOG_ERR, _("netname2user: principal name '%s' too long"),
 	      principal);
       return NSS_STATUS_UNAVAIL;
     }
-  sprintf(sname, "[cname=%s,auth_type=LOCAL],cred.org_dir.%s",
+  sprintf (sname, "[cname=%s,auth_type=LOCAL],cred.org_dir.%s",
 	  principal, domain);
   if (sname[strlen(sname) - 1] != '.')
     strcat(sname, ".");
 
   /* must use authenticated call here */
   /* XXX but we cant, for now. XXX */
-  res = nis_list(sname, USE_DGRAM+NO_AUTHINFO+FOLLOW_LINKS+FOLLOW_PATH,
-		 NULL, NULL);
-  switch(res->status) {
-  case NIS_NOTFOUND:
-  case NIS_PARTIAL:
-  case NIS_NOSUCHNAME:
-  case NIS_NOSUCHTABLE:
-    nis_freeresult (res);
-    return NSS_STATUS_NOTFOUND;
-  case NIS_S_NOTFOUND:
-  case NIS_TRYAGAIN:
-    syslog (LOG_ERR,
-	    "netname2user: (nis+ lookup): %s\n",
-	    nis_sperrno (res->status));
-    nis_freeresult (res);
-    return NSS_STATUS_TRYAGAIN;
-  case NIS_SUCCESS:
-  case NIS_S_SUCCESS:
-    break;   /* go and do something useful */
-  default:
-    syslog (LOG_ERR, "netname2user: (nis+ lookup): %s\n",
-	    nis_sperrno (res->status));
-    nis_freeresult (res);
-    return NSS_STATUS_UNAVAIL;
-  }
+  res = nis_list (sname, USE_DGRAM+NO_AUTHINFO+FOLLOW_LINKS+FOLLOW_PATH,
+		  NULL, NULL);
+  switch(res->status)
+    {
+    case NIS_NOTFOUND:
+    case NIS_PARTIAL:
+    case NIS_NOSUCHNAME:
+    case NIS_NOSUCHTABLE:
+      nis_freeresult (res);
+      return NSS_STATUS_NOTFOUND;
+    case NIS_S_NOTFOUND:
+    case NIS_TRYAGAIN:
+      syslog (LOG_ERR, "netname2user: (nis+ lookup): %s\n",
+	      nis_sperrno (res->status));
+      nis_freeresult (res);
+      return NSS_STATUS_TRYAGAIN;
+    case NIS_SUCCESS:
+    case NIS_S_SUCCESS:
+      break;   /* go and do something useful */
+    default:
+      syslog (LOG_ERR, "netname2user: (nis+ lookup): %s\n",
+	      nis_sperrno (res->status));
+      nis_freeresult (res);
+      return NSS_STATUS_UNAVAIL;
+    }
 
   if (res->objects.objects_len > 1)
     {
@@ -339,7 +339,7 @@ _nss_nisplus_netname2user (char netname[MAXNETNAMELEN + 1], uid_t *uidp,
 	     netname, domain);
     }
   /* Fetch the uid */
-  *uidp = (atoi (ENTRY_VAL (res->objects.objects_val, 2)));
+  *uidp = atoi (ENTRY_VAL (res->objects.objects_val, 2));
 
   if (*uidp == 0)
     {