[Rpm-maint] [rpm-software-management/rpm] Make user/group info reliable operation across chroot (PR #2503)

Panu Matilainen notifications at github.com
Tue May 9 13:52:10 UTC 2023


@pmatilai commented on this pull request.



> +	    }
+	}
+    }
+
+    fclose(f);
+
+    return rc;
+}
+
+static int lookup_num(const char *path, const char *val, int vcol, int rcol,
+			long *ret)
+{
+    char *buf = NULL;
+    int rc = lookup_field(path, val, vcol, rcol, &buf);
+    if (rc == 0) {
+	long num = atol(buf);

Heh, the reason to use atol() over strtol() is "I'll add error handling later" (as in, when the rest of it works) and then promptly forgot :laughing: A fair point and will fix. Erring to root might not be the safest behavior here...

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2503#discussion_r1188636089
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2503/review/1418691485 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230509/dffa9ece/attachment.html>


More information about the Rpm-maint mailing list