Skip to content

Commit 8a2336e

Browse files
rddunlaptorvalds
authored andcommitted
uapi/linux/keyctl.h: don't use C++ reserved keyword as a struct member name
Since this header is in "include/uapi/linux/", apparently people want to use it in userspace programs -- even in C++ ones. However, the header uses a C++ reserved keyword ("private"), so change that to "dh_private" instead to allow the header file to be used in C++ userspace. Fixes https://bugzilla.kernel.org/show_bug.cgi?id=191051 Link: http://lkml.kernel.org/r/[email protected] Fixes: ddbb411 ("KEYS: Add KEYCTL_DH_COMPUTE command") Signed-off-by: Randy Dunlap <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: David Howells <[email protected]> Cc: James Morris <[email protected]> Cc: "Serge E. Hallyn" <[email protected]> Cc: Mat Martineau <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 4e8346d commit 8a2336e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/uapi/linux/keyctl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
/* keyctl structures */
6767
struct keyctl_dh_params {
68-
__s32 private;
68+
__s32 dh_private;
6969
__s32 prime;
7070
__s32 base;
7171
};

security/keys/dh.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ long __keyctl_dh_compute(struct keyctl_dh_params __user *params,
300300
}
301301
dh_inputs.g_size = dlen;
302302

303-
dlen = dh_data_from_key(pcopy.private, &dh_inputs.key);
303+
dlen = dh_data_from_key(pcopy.dh_private, &dh_inputs.key);
304304
if (dlen < 0) {
305305
ret = dlen;
306306
goto out2;

0 commit comments

Comments
 (0)